-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
29 lines (20 loc) · 711 Bytes
/
script.js
File metadata and controls
29 lines (20 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function checkPassword(){
let password = document.getElementById("password").value;
let confrom_Password = document.getElementById("confirmPassword").value;
console.log(password, confrom_Password);
let message = document.getElementById("message");
if (password.length != 0){
if(password == confrom_Password){
message.textContent="Password Matching"
message.style.backgroundColor="green";
}
else{
message.textContent="Password Not Matching"
message.style.backgroundColor="red";
}
}
else{
alert("Password can be empty");
message.textContent="";
}
}