While filling up a form, there comes a situation where we type a password and want to see what we have typed till now. To see that, there is a checkbox clicking on which makes the characters visible.
1)Create a HTML form which contain an input field of type password.
2)Create a checkbox which will be responsible for toggling.
3)Create a function which will response for toggling when a user clicks on the checkbox.
Password is geeksforgeeks.
So, on typing it will show like this *************
And on clicking the checkbox it will show the characters: geeksforgeeks.
- How to Show and Hide div elements using radio buttons?
- How to Show and Hide div elements using Checkboxes ?
- How to show/hide div element depending multiple values using Bootstrap and jQuery ?
- Hide or show elements in HTML using display property
- How to show/hide dropdown menu on mouse hover using CSS ?
- jQuery | Hide/Show, Toggle and Fading methods with Examples
- Define ng-if, ng-show and ng-hide
- How to Hide and show slide arrows in slick slider?
- How to display icon next to show/hide text on button?
- How to hide or show one record from an ng-repeat within a table based on ng-click?
- How to show/hide data when the particular condition is true in AngularJS ?
- How to compare password and confirm password inputs using express-validator ?
- How to Sign In with raw password when password store in the database are hashed form in Node.js ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.