-
Notifications
You must be signed in to change notification settings - Fork 0
/
SignUp.js
79 lines (75 loc) · 2.51 KB
/
SignUp.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
function firstpage(){
let firstpage=document.querySelector(".parent-div")
let secondpage=document.querySelector(".parent-div2")
firstpage.style.display="none"
secondpage.style.display="block"
}
function backfirstpage(){
let firstpage=document.querySelector(".parent-div")
let secondpage=document.querySelector(".parent-div2")
firstpage.style.display="block"
secondpage.style.display="none"
}
function thirdpage(){
let secondpage=document.querySelector(".parent-div2")
let thirdpage=document.querySelector("#thirdpage")
secondpage.style.display="none"
thirdpage.style.display="block"
}
function secondpageback(){
let secondpage=document.querySelector(".parent-div2")
let thirdpage=document.querySelector("#thirdpage")
secondpage.style.display="block";
thirdpage.style.display="none";
}
function fourthpage(){
let secondpage=document.querySelector("#thirdpage")
let thirdpage=document.querySelector("#fourthpage")
secondpage.style.display="none"
thirdpage.style.display="block"
}
function thirdpageback(){
let secondpage=document.querySelector("#thirdpage")
let thirdpage=document.querySelector("#fourthpage")
secondpage.style.display="block"
thirdpage.style.display="none"
}
function fifthpage(){
let secondpage=document.querySelector("#fourthpage")
let thirdpage=document.querySelector("#sixthpage")
secondpage.style.display="none"
thirdpage.style.display="block"
}
function fourthpageback(){
let secondpage=document.querySelector("#fourthpage")
let thirdpage=document.querySelector("#sixthpage")
secondpage.style.display="block"
thirdpage.style.display="none"
}
function lastpage(){
let secondpage=document.querySelector("#fifthpage")
let thirdpage=document.querySelector("#sixthpage")
secondpage.style.display="block"
thirdpage.style.display="none"
}
function signup() {
let user_email = document.getElementById("user_email").value;
let password = document.getElementById("user_password").value;
let user_info;
if (
user_email.length < 1 ||
password.length < 1
) {
alert("Please,fill all the information");
} else {
user_info = {
user_email,
password,
};
localStorage.setItem("user_info", JSON.stringify(user_info));
document.getElementById("user_email").value="";
document.getElementById("user_password").value="";
alert("You've been sign up successful");
window.location.href="./Login.html"
}
}