JavaScript Hide Show Password - Web Development and Web Design Codes


Wednesday, May 2, 2018

JavaScript Hide Show Password

JavaScript Hide Show Password

JavaScript Hide Show Password
JavaScript Hide Show Password
in default input password field does not show any text both other than dot symbols ..some website allow user to show password as text what they are typing in password field..
You can allow user to view password as plain text using JavaScript ..
use below codes to hide show password using javascript..

<title>JavaScript Hide Show Password</title>
function togglePassword() {
	var pass = document.getElementById('pass');
	var toggleBtn = document.getElementById('toggleBtn');
	if(pass.type == "password"){
		pass.type = "text";
		toggleBtn.value = "Hide Password";
	} else {
		pass.type = "password";
		toggleBtn.value = "Show Password";
<h2 color="green">JavaScript Hide Show Password--JavaScript Toggle</h2>
Password:<input id="pass" type="password" name="userpass">
<input id="toggleBtn" type="button" onclick="togglePassword()" value="Show Password">

That's it Friends how to view password as plain text using JavaScript..
Thank you for visiting..


  1. I constantly emailed this website post page to all my contacts, as if like
    to read it after that my links will too.

  2. Hey, I think your site might be having browser compatibility issues.
    When I look at your website in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up!
    Other then that, amazing blog!

  3. Simply desire to say your article is as astonishing. The clarity
    in your post is simply great and i can assume you're an expert on this subject.
    Well with your permission allow me to grab your RSS feed to keep up to
    date with forthcoming post. Thanks a million and please carry on the enjoyable work.

  4. Hi Sir! Thanks for your beautiful help. Your article helped me a lot and clear all my doubts. Your writing style is very impressive and effective. Keep up your good work. Thanks for sharing.


Thank You for Your Comment

Note: Only a member of this blog may post a comment.