-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathforgetpassword.html
More file actions
160 lines (148 loc) · 4.27 KB
/
forgetpassword.html
File metadata and controls
160 lines (148 loc) · 4.27 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!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>forget Password</title>
<link rel="stylesheet" href="/navbar.css" />
<style>
#forget {
width: 30%;
margin: auto;
border: 1px solid rgb(253, 247, 247);
padding: 0px 0px 30px 30px;
margin-top: 40px;
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}
#email,
#otp {
height: 35px;
width: 80%;
border: 1px solid rgb(199, 194, 194);
}
#forButton {
height: 35px;
width: 80%;
background-color: rgb(24, 161, 161);
color: white;
border: 0;
border-radius: 5px;
font-size: large;
}
#forgoogle {
width: 30%;
height: 30px;
border-radius: 10px;
border: 0;
margin-bottom: 20px;
background-color: aliceblue;
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}
</style>
</head>
<body>
<div id="navbar">
<div>
<img
onclick="window.location.href='index.html'"
src="https://static.naukimg.com/s/4/100/i/naukri_Logo.png"
alt="navLogo"
/>
</div>
<div id="navJob">
<div id="com1">
<p onclick="window.location.href='naukri.html'">Jobs</p>
<div class="hov1">
<h3>Popular categories</h3>
</div>
</div>
<div id="com2">
<p onclick="window.location.href='navcompnies.html'">companies</p>
<div class="hov2">
<h4>Explore categories</h4>
</div>
</div>
<div id="com3">
<p onclick="window.location.href='naukri.html'">Services</p>
<div class="hov3">
<h4>Resume writing</h4>
</div>
</div>
<div id="com4">
<p onclick="window.location.href='company.html'">Resources</p>
<div class="hov4">
<h4>Free resume_resources</h4>
</div>
</div>
</div>
<div id="navbtn">
<button onclick="window.location.href='login.html'">Login</button>
<button onclick="window.location.href='signup.html'">Register</button>
</div>
<div>
<select name="employ" id="navEmploy">
<option value="">For employers</option>
<option value="Buy online">Buy online</option>
<option value="our hiring solutions">Our Hiring Solutions</option>
<option value="Employer Login">Employer Login</option>
</select>
</div>
</div>
<!-- body -->
<div id="forget">
<h2>Forget Password</h2>
<button id="forgoogle">Sign in with Google</button>
<br />
<input type="radio" id="id1" /> <label for="id1">Email Id</label>
<input type="radio" id="id2" /> <label for="id2">Username </label>
<form action="" id="forForm">
<p>Email ID</p>
<input type="text" id="email" placeholder="Enter Email ID" />
<p>Enter New password</p>
<input type="text" id="otp" placeholder="Enter New Password" />
<p>Resent OTP</p>
<button id="forButton">Submit</button>
</form>
</div>
</body>
</html>
<script>
var local = JSON.parse(localStorage.getItem("userData"));
var submit = document.querySelector("#forButton")
submit.addEventListener("click", getNewpassword);
function getNewpassword(){
event.preventDefault()
var user = document.querySelector("#email").value
var pass = document.querySelector("#otp").value
var flag=true;
console.log(user,pass)
for(var i=0; i<local.length;i++)
{
if(local[i].name==user)
{
local[i].password=pass
alert("password changed successfully")
window.location.href="index.html"
flag = false
break
}
}
if(flag)
{
alert("User name doesn't exist")
}
}
console.log(local)
document.querySelector("#navEmploy").addEventListener("click", slectFun);
function slectFun() {
event.preventDefault();
let a = document.querySelector("#navEmploy").value;
// console.log(a)
if (a === "Employer Login") {
window.location.href = "employlogin.html";
} else {
return false;
}
}
</script>