|
|
@@ -108,11 +108,15 @@
|
|
|
// addhtml.innerHTML = addhtml.innerText+'<span id="tishi" style="color:red;font-size: 12px;"><br>密码不合法</span>';
|
|
|
// }
|
|
|
document.getElementById("user_password").style.borderColor = "red";
|
|
|
+ document.getElementById("layui-btn").type = "button";
|
|
|
}else{
|
|
|
//console.log(2);
|
|
|
// var remove = document.getElementById("tishi");
|
|
|
// remove.parentNode.removeChild(remove);
|
|
|
document.getElementById("user_password").style.borderColor = "#e6e6e6";
|
|
|
+ if(document.getElementById("confirm_password").style.borderColor != "red" && document.getElementById("user_phone").style.borderColor != "red"){
|
|
|
+ document.getElementById("layui-btn").type = "submit";
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
$("#confirm_password").blur(function(){
|
|
|
@@ -126,11 +130,14 @@
|
|
|
// addhtml.innerHTML = addhtml.innerText+'<span id="tishi_pwd" style="color:red;font-size: 12px;"><br>密码不合法</span>';
|
|
|
// }
|
|
|
document.getElementById("confirm_password").style.borderColor = "red";
|
|
|
+ document.getElementById("layui-btn").type = "button";
|
|
|
}else{
|
|
|
- //console.log(2);
|
|
|
// var remove = document.getElementById("tishi_pwd");
|
|
|
// remove.parentNode.removeChild(remove);
|
|
|
document.getElementById("confirm_password").style.borderColor = "#e6e6e6";
|
|
|
+ if(document.getElementById("user_password").style.borderColor != "red" && document.getElementById("user_phone").style.borderColor != "red"){
|
|
|
+ document.getElementById("layui-btn").type = "submit";
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
//电话校验
|
|
|
@@ -139,17 +146,19 @@
|
|
|
//console.log(password);
|
|
|
var patrn=/^1[3456789]\d{9}$/;
|
|
|
if (!patrn.exec(password)){
|
|
|
- //console.log(1);
|
|
|
// var addhtml = document.getElementById("phone");
|
|
|
// if(document.getElementById("tishi_phone") == null){
|
|
|
// addhtml.innerHTML = addhtml.innerText+'<span id="tishi_phone" style="color:red;font-size: 12px;"><br>电话号码不合法</span>';
|
|
|
// }
|
|
|
document.getElementById("user_phone").style.borderColor = "red";
|
|
|
+ document.getElementById("layui-btn").type = "button";
|
|
|
}else{
|
|
|
- //console.log(2);
|
|
|
// var remove = document.getElementById("tishi_phone");
|
|
|
// remove.parentNode.removeChild(remove);
|
|
|
document.getElementById("user_phone").style.borderColor = "#e6e6e6";
|
|
|
+ if(document.getElementById("user_password").style.borderColor != "red" && document.getElementById("confirm_password").style.borderColor != "red"){
|
|
|
+ document.getElementById("layui-btn").type = "submit";
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
// 协议 校验
|