$(document).ready(function () { // 监听文本框内容变化 $("#chatgpt-response").on("input", function () { // 获取文本框内容 var content = $(this).val();

// 如果文本框中出现了“本站开源地”,则隐藏内容
if (content.indexOf("本站开源地") !== -1) {
  // 隐藏文本框
  $(this).hide();
}

}); });

完整版代码$documentreadyfunction 监听文本框内容变化 $#chatgpt-responseoninput function 获取文本框内容 var content = $thisval; 如果文本框中出现了本站开源地则隐藏内容 if contentindexOf本站开源地 !== -1 隐藏文本框 $thish

原文地址: https://www.cveoy.top/t/topic/9qI 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录