function check_feedback(theform) { if (jtrim(theform.name.value) == "") { alert("请填写联系人姓名!"); theform.name.focus(); return false; } if (!isemail(theform.email.value)) {theform.email.focus();return false;} if (jtrim(theform.title.value) == "") { alert("请填写反馈主题!"); theform.title.focus(); return false; } if (jtrim(theform.message.value) == "") { alert("请填写反馈内容!"); theform.message.focus(); return false; } return true; } function check_leave(theform) { if (theform.name.value == "") { alert("请您填写昵称!"); theform.name.focus(); return (false); } if (!isemail(theform.mail.value)) { theform.mail.focus(); return false; } if (theform.mess.value=="") { alert("请您填写留言信息!"); theform.mess.focus(); return (false); } if (theform.code.value=="") { alert("请您填写验证码!"); theform.code.focus(); return (false); } } function check_regedit(theform) { if (theform.user_no.value == "") { alert("请您填写会员id号!"); theform.user_no.focus(); return (false); } if (theform.user_password.value == "" || theform.user_password.value.length < 6 || theform.user_password.value.length > 12) { alert("请您输入密码,密码位数是6-12位!"); theform.user_password.focus(); return (false); } if (theform.confirm_password.value == "") { alert("请您填写确认密码!"); theform.confirm_password.focus(); return (false); } if (theform.user_password.value != theform.confirm_password.value) { alert("两次输入的密码不一致!"); theform.confirm_password.focus(); return (false); } if (!isemail(theform.user_companyemail.value)) { theform.user_companyemail.focus(); return false; } } function check_job(theform) { if (jtrim(theform.name.value) == "") { alert("请填写联系人姓名!"); theform.name.focus(); return false; } if (jtrim(theform.sr.value) == "") { alert("请填写出生日期!"); theform.sr.focus(); return false; } if (jtrim(theform.tel.value) == "") { alert("请填写联系电话!"); theform.tel.focus(); return false; } if (!isemail(theform.email.value)) { theform.email.focus(); return false; } if (jtrim(theform.lx.value) == "") { alert("请填写通信地址!"); theform.lx.focus(); return false; } return true; } function check_stock(theform) { if (jtrim(theform.contactperson.value) == "") { alert("请输入姓名!"); theform.contactperson.focus(); return false; } if(!isemail(theform.email.value)) { theform.email.focus(); return false; } return true; } function check_product() { for (var i=0;i 100) { window.alert("email地址长度不能超过100位!"); return false; } var regu = "^(([0-9a-za-z]+)|([0-9a-za-z]+[_.0-9a-za-z-]*[0-9a-za-z]+))@([a-za-z0-9-]+[.])+([a-za-z]{2}|net|net|com|com|gov|gov|mil|mil|org|org|edu|edu|int|int)$" var re = new regexp(regu); if (s.search(re) != -1) { return true; } else { window.alert ("请输入有效合法的e-mail地址 !") return false; } } function jtrim(str) { var i = 0; var len = str.length; if ( str == "" ) return( str ); j = len -1; flagbegin = true; flagend = true; while ( flagbegin == true && i< len) { if ( str.charat(i) == " " ) { i=i+1; flagbegin=true; } else { flagbegin=false; } } while (flagend== true && j>=0) { if (str.charat(j)==" ") { j=j-1; flagend=true; } else { flagend=false; } } if ( i > j ) return ("") trimstr = str.substring(i,j+1); return trimstr; }