Created
March 8, 2019 15:38
-
-
Save ricardozea/50d0a2b5473fd980a26956b665ad9c2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label class="show-password"><input type="checkbox" onclick="showPass()">Show password</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Show Password | |
function showPass() { | |
var pass = document.getElementById("password"); //Input field id | |
if (pass.type === "password") { | |
pass.type = "text"; | |
} else { | |
pass.type = "password"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment