function validatePassWord(pwd){
/* var zhenze=new RegExp("^(?![a-zA-Z]+$)(?![a-z\d]+$)(?![a-z!@#\$%]+$)(?![A-Z\d]+$)(?![A-Z!@#\$%]+$)(?![\d!@#\$%]+$)[a-zA-Z\d!@#\$%]+$");
if(zhenze.test(pwd)){
return true;
}
return false; */
if(pwd == null){
pwd = $("#newPassWord").val();
}
var regUpper = /[A-Z]/;
var regLower = /[a-z]/;
var regNum = /[0-9]/;
var regTeShu =new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]");
var complex = 0;
if (regLower.test(pwd)) {
++complex;
}
if (regUpper.test(pwd)) {
++complex;
}
if (regNum.test(pwd)) {
++complex;
}
if(regTeShu.test(pwd)){
++complex;
}
if (complex < 3 || pwd.length < 8) {
document.getElementById("checkpwd").innerHTML = "<div class='control-label red'>密码不符合要求</div>";
return false;
} else {
document.getElementById("checkpwd").innerHTML = "<div class='control-label green'>密码符合要求</div>";
return true;
}
}