Show and Hide Password on checkbox click in HTML with Javascript
In this example, I will explain how to Show and hide Password on checkbox click in HTML with javaScript. This Example also used website developed using php.
First of all, This feature allows user to check their password when they enter in textbox. On show password checkbox click , password will display in text format. If checkbox is unchecked then password will display in password type.
Now, show the code of this example which is given below. Let's see :
First of all, This feature allows user to check their password when they enter in textbox. On show password checkbox click , password will display in text format. If checkbox is unchecked then password will display in password type.
Now, show the code of this example which is given below. Let's see :
File Name : demo.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <html> <head> </head> <body> Pasword : <input type="password" name="password" id="password" /> <br/> <br /> <input type="checkbox" id="eye" onclick="if(password.type=='text')password.type='password'; else password.type='text';"/>Show Password </body> </html> |
Output:
Html Tutorial, JavaScript, Show and Hide password on Checkbox click, Show and Hide Password on Checkbox click in HTML with JavaScript
0 comments:
Post a Comment