-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
24 lines (20 loc) · 799 Bytes
/
script.js
File metadata and controls
24 lines (20 loc) · 799 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
document.getElementById('signupForm').addEventListener('submit', function(event) {
const password = document.getElementById('password').value;
const confirmpassword = document.getElementById('confirmpassword').value;
if (password !== confirmpassword) {
alert("Passwords do not match!");
} else {
alert("Account created successfully!");
}
});
function togglePassword() {
var passwordInput = document.getElementById('password');
var confirmpassword = document.getElementById("confirmpassword");
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
confirmpassword.type = "text";
} else {
passwordInput.type = 'password';
confirmpassword.type = "password";
}
}