level 1
bujichong
楼主
验证语句部分:
<!--function jc(){ if(checkspace(document.form_creg.username.value)) {document.form_creg.username.focus(); alert("对不起,请填写用户名!");return false; } if(checkspace(document.form_creg.passwd.value) || document.form_creg.passwd.value.length < 6 || document.form_creg.passwd.value.length >20) {document.form_creg.passwd.focus(); alert("密码长度在6位到20位之间,请重新输入!");return false; } if(document.form_creg.passwd.value != document.form_creg.passwd2.value) {document.form_creg.passwd.focus();document.form_creg.passwd.value = '';document.form_creg.passwd2.value = ''; alert("两次输入的密码不同,请重新输入!");return false; } if(document.form_creg.usermail.value.length!=0) if (document.form_creg.usermail.value.charAt(0)=="." || document.form_creg.usermail.value.charAt(0)=="@"|| document.form_creg.usermail.value.indexOf('@', 0) == -1 || document.form_creg.usermail.value.indexOf('.', 0) == -1 || document.form_creg.usermail.value.lastIndexOf("@")==document.form_creg.usermail.value.length-1 || document.form_creg.usermail.value.lastIndexOf(".")==document.form_creg.usermail.value.length-1) { alert("Email地址格式不正确!"); document.form_creg.usermail.focus(); return false; }if(checkspace(document.form_creg.usermail.value)) { alert("Email不能为空!"); document.form_creg.usermail.focus(); return false; } if(checkspace(document.form_creg.usertip.value)) {document.form_creg.usertip.focus(); alert("对不起,请填写密码提示问题!");return false; } if(checkspace(document.form_creg.useranswer.value)) {document.form_creg.useranswer.focus(); alert("密码提示答案不能为空!");return false; } if(checkspace(document.form_creg.enterpriseName .value)) {document.form_creg.enterpriseName.focus(); alert("对不起,请填写公司名称!");return false; } if(checkspace(document.form_creg.contactPhone.value)) {document.form_creg.contactPhone.focus(); alert("公司联系电话不能为空!");return false; } if(checkspace(document.form_creg.appointedContactor.value)) {document.form_creg.appointedContactor.focus(); alert("对不起,请填写公司联系人姓名!");return false; } if(checkspace(document.form_creg.appointedPhone.value)) {document.form_creg.appointedPhone.focus(); alert("对不起,请留下联系人的电话!");return false; }}//-->表单部分:
用 户 名:
* 2-20个字符,首字符必须是字母,其后只能含有字母、数字和下划线
2007年07月22日 08点07分
1
<!--function jc(){ if(checkspace(document.form_creg.username.value)) {document.form_creg.username.focus(); alert("对不起,请填写用户名!");return false; } if(checkspace(document.form_creg.passwd.value) || document.form_creg.passwd.value.length < 6 || document.form_creg.passwd.value.length >20) {document.form_creg.passwd.focus(); alert("密码长度在6位到20位之间,请重新输入!");return false; } if(document.form_creg.passwd.value != document.form_creg.passwd2.value) {document.form_creg.passwd.focus();document.form_creg.passwd.value = '';document.form_creg.passwd2.value = ''; alert("两次输入的密码不同,请重新输入!");return false; } if(document.form_creg.usermail.value.length!=0) if (document.form_creg.usermail.value.charAt(0)=="." || document.form_creg.usermail.value.charAt(0)=="@"|| document.form_creg.usermail.value.indexOf('@', 0) == -1 || document.form_creg.usermail.value.indexOf('.', 0) == -1 || document.form_creg.usermail.value.lastIndexOf("@")==document.form_creg.usermail.value.length-1 || document.form_creg.usermail.value.lastIndexOf(".")==document.form_creg.usermail.value.length-1) { alert("Email地址格式不正确!"); document.form_creg.usermail.focus(); return false; }if(checkspace(document.form_creg.usermail.value)) { alert("Email不能为空!"); document.form_creg.usermail.focus(); return false; } if(checkspace(document.form_creg.usertip.value)) {document.form_creg.usertip.focus(); alert("对不起,请填写密码提示问题!");return false; } if(checkspace(document.form_creg.useranswer.value)) {document.form_creg.useranswer.focus(); alert("密码提示答案不能为空!");return false; } if(checkspace(document.form_creg.enterpriseName .value)) {document.form_creg.enterpriseName.focus(); alert("对不起,请填写公司名称!");return false; } if(checkspace(document.form_creg.contactPhone.value)) {document.form_creg.contactPhone.focus(); alert("公司联系电话不能为空!");return false; } if(checkspace(document.form_creg.appointedContactor.value)) {document.form_creg.appointedContactor.focus(); alert("对不起,请填写公司联系人姓名!");return false; } if(checkspace(document.form_creg.appointedPhone.value)) {document.form_creg.appointedPhone.focus(); alert("对不起,请留下联系人的电话!");return false; }}//-->表单部分:
用 户 名:
* 2-20个字符,首字符必须是字母,其后只能含有字母、数字和下划线