Here is simple method to check the password strength using javascript, just copy and paste the script given below in your registration field and customize it accordingly.Add this code below inside the body tags of your page.
Please make sure that when you just copy and paste the code given below do remember to change the quotes, it will be in ascii character while copying.Dont forget!!!!, if it is not changed the script wont work.
For example as you can see the quotes in the first line where the javascript is inside ” quotes and this one must be changed to double quotes when it is coped to your code.
<script language="javascript">
function passwordCheck()
{var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z]) (?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");
var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");
var enoughRegex = new RegExp("(?=.{6,}).*", "g");
var pwd = document.getElementById("password");
if (pwd.value.length==0) {
document.getElementById('check').innerHTML = 'Type Password';
} else if (false == enoughRegex.test(pwd.value)) {
document.getElementById('check').innerHTML = 'More Characters';
} else if (strongRegex.test(pwd.value)) {
document.getElementById('check').innerHTML = '<b><span style="color:green">
Strong!</span>';
} else if (mediumRegex.test(pwd.value)) {
document.getElementById('check').innerHTML = '</b><b><span style="color:orange">
Medium!</span>';
} else {
document.getElementById('check').innerHTML = '</b><b><span style="color:red">Weak!</span>';
}}
</b></script>
<input name="password" id="password" type="text" size="15" maxlength="20" onkeyup="return passwordCheck();" />
<span id="check">Type Password</span>
Thank you very much.
Incoming search terms:
- check password strength javascript (15)
- how to check password strength in javascript (12)
- check password strength using javascript (8)
- password strength using javascript (8)
- javascript password strength script (7)
- how the password strength can be known by using jsp code (7)
- javascript check password strength (6)
- checking password strength javascript (6)
- check password strength in jsp (5)
- password strength using java script (3)
- sample codes for checking the strength of password using jsp (3)
- jsp check password strength (2)
- javascript to validate password strength in java (2)
- javascript test password strength (2)
- javascript password strength using images (2)
- java code for checking password strength (2)
- jsp code for password strength checking (2)
- jsp password strength ajax example (2)
- simple password strength using php (2)
- script simple javascript password strength (2)
- php code for password strong show (2)
- password strength show using jsp (2)
- password strength scripts (2)
- password strength jsp (2)
- password strength javascript example (2)
- password strength javascript (2)
- Password strength checker in javascript (2)
- password strength check using javascript (2)
- find password strength in php (2)
- ajax jsp check password (2)
- check password strength with javascript (2)
- check password javascript (2)
- basic password strength using javascript in html (2)
- check password strength in sample jsp (2)
- checking password strength in jsp (2)
- check password using php (2)
- password strength checking using javascript (1)
- password strength code in javascript (1)
- password strength checking javascript (1)
- password strength code in jsp (1)
You will also be interested in ,
- Javascript Popup Chromeless Window
- Suppress javascript errors on your webpage easily
- Change webpage background color using javascript
- Adding and removing child nodes using javascript and DOM
- Javascript setTimeout() Tricks
- Auto refresh page with timer using javascript
- Beautiful Christmas countdown timer complete webpage with css download free
- Insert text and smilies in to textarea using javascript
- Disabling right click menu using javascript
- Get IP address using javascript And SSI
