<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> =" %&'/",;:=!^]";<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> 🎜 ><br></szmsg.length> </div>