Answers for "javascript password matching"

1

javascript password matching

let pass1 = document.getElementById("pass-one");
    let pass2 = document.getElementById("pass-two");
    let run = document.getElementById("run");

    run.addEventListener("click", function () {
        if (pass1.value !== pass2.value) {
            pass1.style.border = '3px solid red';
            pass2.style.border = '3px solid red';
            run.innerHTML = "Mismatch";
        } else {
            pass1.style.border = '3px solid green';
            pass2.style.border = '3px solid green';
            run.innerHTML = "Matching"
        }
    })
Posted by: Guest on October-24-2020
1

password and confirm password validation js

var check = function() {
  if (document.getElementById('password').value ==
    document.getElementById('confirm_password').value) {
    document.getElementById('message').style.color = 'green';
    document.getElementById('message').innerHTML = 'matching';
  } else {
    document.getElementById('message').style.color = 'red';
    document.getElementById('message').innerHTML = 'not matching';
  }
}
Posted by: Guest on August-26-2020

Code answers related to "javascript password matching"

Code answers related to "Javascript"

Browse Popular Code Answers by Language