jquery Authentication Password Strength plugin (support show hidden)

Source: Internet
Author: User

Many registration pages now display password strength, telling users to use a highly complex password. The principle is to use JS trigger text form input elements of the KeyUp event, according to the length of the input characters and the number of types (such as numbers, lowercase letters, uppercase letters, special characters, etc.) dynamically modify the hint element style and text.

The following strength Plug-ins are based on jquery.

1. Introduction of documents


<link href= "Css/style.css" type= "Text/css" rel= "stylesheet"/>
<script type= "Text/javascript" src= "Js/jquery.min.js" ></script>
<script type= "Text/javascript" src= "Js/strength.js" ></script>

2. Add Validation js


$ (document). Ready (function ($) {
$ (' #password '). Strength ({
Strengthclass: ' Strength ',
Strengthmeterclass: ' Strength_meter ',
Strengthbuttonclass: ' Button_strength ',
Strengthbuttontext: ' Show password ',
Strengthbuttontexttoggle: ' Hide password '
});

});

3.form structure


<form id= "Verify" >
<label> Enter a test password </label>
<input type= "password" id= "password" "Name=" ">
</form>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.