Show and Hide Password is a JavaScript project that is currently widely used. This allows you to hide the password or text in an input box.
Currently, we see such systems in almost all types of social media and website login forms. Even when we turn on the window, we see the Show and Hide Password option in the Password Input Place.
In this article, we are going to learn how to create a Show and Hide password system using JavaScript programming code. This type of system is used in a variety of login and registration forms. Earlier I designed many types of login forms but did not add the option to hide passwords and show. But in this article, I have shown that.
This type of design is used where passwords are input. When you input the password, it is seen in bullet format. In that place, you will see a small button or icon which, when clicked, will turn the bullet marks into characters.
Video Tutorial of Show and Hide Password
If you have difficulty understanding then you can watch the video tutorial below. In the video tutorial below you will learn how I made this design very easily using JavaScript code.
Hopefully, the video tutorial above has helped you to know how I made this design. As you can see in the video above, I made a small box on the first web page.
In that box, I created an input place to input. If you input a password in the input field, it will appear in bullet format. When you click on the icon to the right of that place, those bullet formats will become characters. When you click on that icon again, the passwords will be converted to bullet format again.
See related design:
➧ Login Form With Password Validation
➧ Login & Registration Form using JavaScript
➧ Random Password generator javascript
➧ Popup Contact Form
Show and Hide Password using Javascript [Source Code]
For your convenience, I have given below the necessary source code. If you want, you can copy those codes and use them in your own project. First of all, you create an HTML and CSS file.
Be sure to attach your CSS file to the HTML file. In this case, you must add the font awesome CDN link in the head section of your HTML file to implement the icon I used.
Use HTML code to build its structure
The following programming codes are the HTML programming codes that helped build the structure of this design. You copy the following HTML code and then paste it into the body tag (<body> </body>) of your HTML file.
Design it using CSS code
Now let's design the HTML code added above using CSS code. For this, you copy the following CSS codes then paste them into your CSS file. If you do not create a CSS file, you can paste these codes into the HTML file using the style tag.
Activate it using JavaScript code
JavaScript plays a vital role in implementing this program (Show and Hide Password using Javascript). In this case, very little JavaScript is used. You copy the JavaScript code below and paste it into your HTML file using the script tag (<script> </script>).
I hope you have made this Show and Hide Password system. If you want to know how it works then check out the demo below 👇👇👇
See the Pen by Raj Template (@RajTemplate) on CodePen.
Comments
Post a Comment
Ask Me Anything ........