js代码
[removed]
function checkreg() {
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})) \d{8})$/;
if(document.form1.name.value == "") {
//alert("请输入您的用户名!");
document.getElementById("tish")[removed] = "请输入您的用户名!";
form1.name.focus();
return false;
}
document.getElementById("tish")[removed] = "正确";
// if (document.form1.User.value.length15)
// {
// alert("用户名长度限制在4-15位!");
// form1.User.focus();
// return false;
// }
if(document.form1.password.value == "") {
//alert("请输入密码!");
document.getElementById("ts")[removed] = "请输入密码";
form1.password.focus();
return false;
}
if(document.form1.password.value.length 20) {
//alert("密码长度限制在6-20位!");
document.getElementById("ts")[removed] = "密码长度限制在6-20位!";
form1.password.focus();
return false;
}
document.getElementById("ts")[removed] = "正确";
if(document.form1.password.value != document.form1.Pwdagain.value) {
document.getElementById("tishi")[removed] = "两次密码不相同";
form1.password.focus();
return false;
}
document.getElementById("tishi")[removed] = "正确";
// alert("注册成功!");
// location.href="http://www.lanrenzhijia.com";
if(!myreg.test(document.form1.phone.value)) {
document.getElementById("tss")[removed] = "手机号码错误";
form1.password.focus();
return false;
}
document.getElementById("tss")[removed] = "正确";
if(document.form1.code.value == "") {
document.getElementById("tsi")[removed] = "验证码不能为空";
form1.code.focus();
return false;
}
document.getElementById("tsi")[removed] = "正确";
location.href="homepage.html";
}
function sendMessage(t) {
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})) \d{8})$/;
if(!myreg.test(document.form1.phone.value))
{
alert('请输入有效的手机号码!');
return false;
} //
document.form1.dynamic.disabled = true;
for(i = 1; i <= t; i ) {
window.setTimeout("update_p(" i "," t ")", i * 1000);
}
}
function update_p(num, t) {
if(num == t) {
document.form1.dynamic.value = " 重新发送 ";
document.form1.dynamic.disabled = false;
}
else {
printnr = t - num;
document.form1.dynamic.value = " (" printnr ")秒后重发";
}
}
[removed]
1