1 let pass1 = document.getElementById("pass-one");
2 let pass2 = document.getElementById("pass-two");
3 let run = document.getElementById("run");
4
5 run.addEventListener("click", function () {
6 if (pass1.value !== pass2.value) {
7 pass1.style.border = '3px solid red';
8 pass2.style.border = '3px solid red';
9 run.innerHTML = "Mismatch";
10 } else {
11 pass1.style.border = '3px solid green';
12 pass2.style.border = '3px solid green';
13 run.innerHTML = "Matching"
14 }
15 })
1var check = function() {
2 if (document.getElementById('password').value ==
3 document.getElementById('confirm_password').value) {
4 document.getElementById('message').style.color = 'green';
5 document.getElementById('message').innerHTML = 'matching';
6 } else {
7 document.getElementById('message').style.color = 'red';
8 document.getElementById('message').innerHTML = 'not matching';
9 }
10}