<p>Click the radio button to show and hide password:</p>
Password: <input type="password" value="test123" id="myInput"><br><br>
<input type="checkbox" onclick="myFunction()">Show Password
function myFunction() {
  var x = document.getElementById("myInput");
  if (x.type === "password") {
    x.type = "text";
  } else {
    x.type = "password";
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.