document.getElementById("authcode").value; var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/; //正则表达式 if (email.length == 0) { alert("Please enter your email!"); return false; }else if(!reg.test(email)){ //正则验证不通过,格式不对 alert("Email format error!"); return false; }else if (authcode.length < 4) { alert("Please enter authcode!"); return false; }else if (message.length == 0) { alert("Please enter your message!"); return false; }else{ //alert("Inquery submit success!"); return true; } } function changing(){ document.getElementById('captcha_img').src="https://www.asdscrew.com/mail/code.php?"+Math.random(); }