<div class="codetitle"> <span><a style="CURSOR: pointer" data="72681" class="copybut" id="copybut72681" onclick="doCopy('code72681')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code72681"> <br>function checks(t){<br> szMsg="[#_%&'/",;:=!^]";<br> alertStr="";<br> for(i=1;i<szmsg.length> if(t.indexOf(szMsg.substring(i-1,i))>-1){<br> alertStr="请勿包含非法字符如[#_%&'/",;:=!^]";<br> break;<br> }<br> }<br> if(alertStr != ""){<br> alert(alertStr);<br> return false;<br> }<br> return true;<br> }<br></szmsg.length> </div>