var reChar=/^[\w\-]+$/; var reChar1=/^[a-zA-Z0-9]{4}$/; function CloseWin() { var ua=navigator.userAgent var ie=navigator.appName=="Microsoft Internet Explorer"?true:false if(ie){ var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE ")))) if(IEversion< 5.5){ var str = '' str += ''; document.body.insertAdjacentHTML("beforeEnd", str); document.all.noTipClose.Click(); } else{ window.opener =null; window.close(); } } else{ window.close() } } function LoginSubmit() { x=document.login_form lenID=x.username.value lenPW=x.pwd.value yanzm=x.yanzm.value if (!reChar.test(lenID)){ alert("请输入一个有效用户代码!\n\n请勿使用字母,数字,下划线以外的其他符号。"); if (x.username.select) { x.username.select(); } if (x.username.focus) { x.username.focus(); } return false } if (!reChar.test(lenPW)){ alert("请输入一个有效密码!\n\n密码可以由字母,数字,下划线组成。"); if (x.pwd.select) { x.pwd.select(); } if (x.pwd.focus) { x.pwd.focus(); } return false } if (!reChar1.test(yanzm)){ alert("请输入一个有效验证码!\n\n验证码可以由字母,数字组成,长度为4位。"); if (x.yanzm.select) { x.yanzm.select(); } if (x.yanzm.focus) { x.yanzm.focus(); } return false } // document.form.submit(); window.open("","NewDefault","width=1010,height=705,resizable=yes,status=no,scrollbars=yes,toolbar=no,menubar=no,location=no,top=1,left=0"); window.CloseWin() } //回车键 isIE=document.all? 1:0 function noEnter(e){ keyEntry = !isIE? e.which:event.keyCode; if(keyEntry=='13') { return true; } }