Answers for "html button to see password"

5

how to make a show password button

function myFunction() {
  var x = document.getElementById("*passwordbox-id*");
  if (x.type === "password") {
    x.type = "text";
  } else {
    x.type = "password";
  }
}
Posted by: Guest on March-28-2020
0

how to add see button in password input in html

togglePassword.addEventListener('click', function (e) {
    // toggle the type attribute
    const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
    password.setAttribute('type', type);
    // toggle the eye / eye slash icon
    this.classList.toggle('bi-eye');
});Code language: JavaScript (javascript)
Posted by: Guest on August-14-2021
5

how to make a show password button

function myFunction() {
  var x = document.getElementById("*passwordbox-id*");
  if (x.type === "password") {
    x.type = "text";
  } else {
    x.type = "password";
  }
}
Posted by: Guest on March-28-2020
0

how to add see button in password input in html

togglePassword.addEventListener('click', function (e) {
    // toggle the type attribute
    const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
    password.setAttribute('type', type);
    // toggle the eye / eye slash icon
    this.classList.toggle('bi-eye');
});Code language: JavaScript (javascript)
Posted by: Guest on August-14-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language