<form name="FORM" id="FORM" method="post" action="?action=$atc" enctype="multipart/form-data" onsubmit="return CheckForm();">
<textarea name='postdb[content]' id='atc_content' style='width:700px;height:392px;;' onkeyup="checkLength();">$rsdb[content]</textarea>
<br/>
已输入字数:<span id="zs" style="color:Red;">0</span> (内容一定要丰富,充实,一般在8000字以上时,收录 和 排名 效果才会很好,里面内容请勿 重复、堆叠!)
<br/>
<span style="color:#CC6600"></span><font color='red' id="show_word"></font>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | <SCRIPT LANGUAGE= "JavaScript" > // 多个敏感词,这里直接以数组的形式展示出来 var arrMg = [ "fuck" , "tmd" , "他妈的" , "按摩" ]; </SCRIPT> <SCRIPT LANGUAGE= "JavaScript" > function Trim(str,is_global) { var result; result = str.replace(/(^\s+)|(\s+$)/g, "" ); if (is_global.toLowerCase()== "g" ) { result = result.replace(/\s/g, "" ); } return result; } function CheckForm(){ //检测内容里是否有敏感词 var inputContent = Trim($( '#atc_title' ).val().toLowerCase()+$( '#atc_keywords' ).val().toLowerCase()+$( '#atc_content' ).val().toLowerCase(), "g" ); var showContent= "" ; for ( var i = 0; i < arrMg.length; i++) { if (inputContent.indexOf(arrMg[i]) > 0){ showContent =showContent+arrMg[i]+ ", " ; } } if (showContent.length>0){ alert( "发现 敏感词!" ); $( '#show_word' ).html( "发现敏感词:" +showContent.toString()); return false ; } //检测内容是否超过5000字 if ($( '#atc_content' ).val().length<2000){ var truthBeTold = window.confirm( "信息内容 过少,为了你的信息能 获得好的 收录 和 排名,强烈建议增加 内容,最好 超过5000字 !\\n\\n内容一定要丰富,充实,一般在5000字以上时,收录 和 排名 效果才会很好,内容请勿 重复、堆叠!\\n\\n\\n\\n\\n\\n单击“确定”继续发布。单击“取消”返回增加内容。" ); if (truthBeTold) { } else { return false ;} } } function checkLength() { var curr = $( '#atc_content' ).val().length; //当前输入的 $( '#zs' ).html(curr.toString()); } </SCRIPT> |
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET制作智能桌面机器人:结合BotSharp智能体框架开发语音交互
· 软件产品开发中常见的10个问题及处理方法
· .NET 原生驾驭 AI 新基建实战系列:向量数据库的应用与畅想
· 从问题排查到源码分析:ActiveMQ消费端频繁日志刷屏的秘密
· 一次Java后端服务间歇性响应慢的问题排查记录
· 互联网不景气了那就玩玩嵌入式吧,用纯.NET开发并制作一个智能桌面机器人(四):结合BotSharp
· 一个基于 .NET 开源免费的异地组网和内网穿透工具
· 《HelloGitHub》第 108 期
· Windows桌面应用自动更新解决方案SharpUpdater5发布
· 我的家庭实验室服务器集群硬件清单
2015-04-15 php 读取网站页面源码的经典函数