js Password strength Password password detection function
Functions click_password_input (thisinput)
{
regpasswordinfo.classname = " Show exactness ";
regpasswordinfo.innerhtml = 1. The password can only be composed of English letter a~z (case-insensitive), digital 0~9, _ (underline). <br>2. Password length is 6~20 characters. ";
}
Function Check_password_input (thisinput)
{
var count = thisinput.value.length;
var words =/^[a-z0-9a-z_]+$/;
if (count==0) {
regpasswordinfo.classname= "show null";
Regpasswordinfo.innerhtml= "<font color= #FF0000 > System does not detect your input! </font><br><br> ";
}
else if (!thisinput.value.match (words) | | | Count < 6 | | | count >)
{
regpass Wordinfo.classname = "show null";
regpasswordinfo.innerhtml = "<font color= #FF0000 > input does not conform to specification! </font><br><br> ";
}
else
{
regpasswordinfo.classname = "show exactness";
regpasswordinfo.innerhtml = "The content conforms to the specification, can use!" <br><br> ";
}
}
//chkpassword Confirm Password detection
function click_chkpassword_input (thisinput)
{
var opass = Thisinput.value;
if (Opass = = "")
{
thisinput.focus ();
}else{
regchkpasswordinfo.classname= "show exactness";
Regchkpasswordinfo.innerhtml= "Please enter confirmation password";
}
}
Function Check_chkpassword_input (thisinput)
{
var Opass = $ ("PassWord"). Value;
if ( thisinput.value.length==0)
{
regchkpasswordinfo.classname= "show null";
regchkpasswordinfo.innerhtml = "<font color= #FF0000 > System does not detect your input! </font> ";
}
else if (thisinput.value!= opass)
{
regchkpasswordinfo.classname= "show null";
regchkpasswordinfo.innerhtml = "<font color= #FF0000 > Confirm password is inconsistent with password! </font> ";
}
else
{
regchkpasswordinfo.classname = "show exactness";
regchkpasswordinfo.innerhtml = "Password Confirm pass!" ";
}
}