-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsignUpPage.js
53 lines (30 loc) · 1.25 KB
/
signUpPage.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
var logInBtn = document.getElementById('logInBtn');
logInBtn.addEventListener('click', function () {
if (document.getElementById('accountNumber').value === '') {
alert('Please input your Account Number!');
} else if (document.getElementById('password').value === '') {
alert('Please input your password!');
} else {
document.getElementById('aBtn').setAttribute('href', 'index.html');
}
})
var aCancel = document.querySelector('.icon a');
aCancel.addEventListener('click', function () {
aCancel.setAttribute('href', 'index.html');
})
var aTurnToCreateAccount = document.querySelector('#turnToCreateAccount a');
aTurnToCreateAccount.addEventListener('click', function () {
aTurnToCreateAccount.setAttribute('href', 'createAccount.html');
});
var eyeClose = document.getElementById('eyeClose');
var eyeOpen = document.getElementById('eyeOpen');
eyeClose.onclick = function () {
eyeClose.setAttribute("style", "display: none");
eyeOpen.setAttribute("style", "display: block");
password.setAttribute("type", "text");
}
eyeOpen.onclick = function () {
eyeOpen.setAttribute("style", "display: none");
eyeClose.setAttribute("style", "display: block");
password.setAttribute("type", "password");
}