Q:

Javascript Program to implement Password Visibility

0

Program to implement Password Visibility as by using checkbox button to show the password.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<html>
<body>

<p>Click the radio button to show the password:</p>

Password: <input type="password" id="InputValue"><br><br>
<input type="checkbox" onclick="Function()">Show Password

<script>
function Function() {
    var show = document.getElementById("InputValue");
    if (show.type === "password") {
        show.type = "text";
    } else {
        show.type = "password";
    }
}
</script>

</body>
</html>

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now