name.focus(); return false; } if(document.email.value == "") { alert("你必須輸入你的電子郵件!"); document.email.focus(); return false; } if(document.content.value =="" ) { alert("請輸入您的信息"); document.content.focus(); return false; } var ah = document.content.value.length; if (ah < 10 ) { alert ("輸入的信息內容太少!"); document.content.focus(); return false; } if(document.admin_yz.value =="" ) { alert("您必須輸入驗證碼!"); document.admin_yz.focus(); return false; } if (document.email.value !== "") { var checkOK2 = document.email.value; var checkStr2 = "@."; var allValid2 = true; var decPoints2 = 0; var allNum2 = ""; for (i = 0; i < checkStr2.length; i++) { ch2 = checkStr2.charAt(i); for (j = 0; j < checkOK2.length; j++) if (ch2 == checkOK2.charAt(j)) break; if (j == checkOK2.length) { allValid2 = false; break; } if (ch2 != ".") allNum2 += ch2; } if (!allValid2) { alert("無效的郵件地址!"); document.email.focus(); return (false); } } }
在線給我們留言