function verification(){
var regLetter = /[A-Za-z]/;
var regNum = /[0-9]/;
var regTeShu =new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?+-]");
var password=$("#pwd").val();
var complex = 0;
if (regLetter.test(password)){
++complex;
}
if (regNum.test(password)){
++complex;
}
if (regTeShu.test(password)){
++complex;
}
if (complex < 3 || password.length < 8) {
alert("密码长度不小于8位,包含数字、字母、符号中的至少3种");//iview中的一个提示框
return false;
}
else{
alert("成功");
return true;
}
}