-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontinueWithEmail.html
More file actions
100 lines (75 loc) · 2.32 KB
/
continueWithEmail.html
File metadata and controls
100 lines (75 loc) · 2.32 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="navbar.css">
</head>
<style>
* {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
#Email_page {
height: 500px;
width: 300px;
margin: auto;
/* border: 1px solid red; */
}
h2 {
margin-top: 70px;
text-align: center;
}
form>input {
border: none;
outline: none;
border-bottom: 1px solid black;
font-size: medium;
}
#web_forgot_password {
border: none;
font-size: medium;
}
#web_login_submit {
padding: 15px 100px 15px;
font-size: medium;
}
</style>
<body>
<div id="Email_page">
<h2>Log in to your account</h2> <br>
<br>
<form>
<input id="email" placeholder="Email" required="required" type="email"> <br>
<br>
<br>
<input id="password" placeholder="Password" required="required">
<br>
<br>
<br>
<button type="button" id="web_forgot_password">Forgot Password?</button>
<br>
<br>
<input type="submit" id="web_login_submit" value="Login">
<!-- <button id="web_login_submit" type="submit">Login</button> -->
</form>
</div>
<script>
document.querySelector('form').addEventListener('submit', loginFn);
var registeredUsers = JSON.parse(localStorage.getItem('UsersData'));
function loginFn() {
event.preventDefault();
var enteredEmail = document.querySelector('#email').value;
var enteredPassword = document.querySelector('#password').value;
registeredUsers.forEach(userData => {
if (userData.email === enteredEmail && userData.password === enteredPassword) {
alert("LOGIN SUCCESS");
window.location.href = 'index.html';
}
});
alert("enter correct");
}
</script>
</body>
</html>