Android Tutorial , Programming Tutorial, Php Tutorial, Learn Android, HTML Tutorial, Coding , Java Tutorial, GTU Programs, Learning Programming

Tuesday 20 September 2016

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 :

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:


0 comments:

Post a Comment

Like us on Facebook

Site Visitor

Powered by Blogger.