Today, with the development of web in the tutorial www.bkjia.com, many forums and bloggers have added the function of verifying the password strength during user registration. Recently, I received a letter from the webmaster asking the customer to compile some examples in this area. Today we will share a piece of instance code, as shown below:
<Html> <title> javascript password Strength Verification-help house LIEHUO.. NET </TITLE> <body> User input password security test <br> the help house provides you with a tutorial. For more tutorials: http://www.bkjia.com/<form name = form1 action = ""> input password: <input type = password size = 10 onKeyUp = pwStrength (this. value) onBlur = pwStrength (this. value)> <br> password strength: <table width = "217" border = "1" cellspacing = "0" cellpadding = "1" bordercolor = "# cccccc" height = "23" style = 'display: inline'> <tr align = "center" bgcolor = "# eeeeee"> <td width = "33%" id = "strength_L"> weak </td> <td width =" 33% "id =" strength_M "> medium </td> <td width =" 33% "id =" strength_H "> strong </td> </tr> </table> </form> </body>
Tip: the code can be modified before running!