-
Notifications
You must be signed in to change notification settings - Fork 2
/
forget.html
76 lines (63 loc) · 2.39 KB
/
forget.html
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
<!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="./style/forget.css">
</head>
<body>
<div id="main">
<img id="image-b" src="./image/back.png"/>
<div id="box">
<h2 id="fpassword">Forget password</h2>
<p>Please enter your email id we will send you a reset password link. Also be sure to check your spam for the reset link.
</p>
<div id="emaai">
<div class="field">
<input type="email" name="email" id="email" placeholder="Enter E-mail">
<label for="email">Email</label>
</div>
</div>
<div id="jldi"></div>
<div id="fo">
<button id="butt">Submit</button>
</div>
</div>
</div>
</body>
</html>
<script type="module" >
import forgeta from "./scripts/forget.js"
let butt=document.getElementById("butt").addEventListener("click",function(){
let get=JSON.parse(localStorage.getItem("userdata"));
let val=Math.floor(1000+Math.random()*9000);
let emailval=document.getElementById("email").value;
document.querySelector("#fo").innerHTML=`<img src="https://wpamelia.com/wp-content/uploads/2018/11/ezgif-2-6d0b072c3d3f.gif"/>`;
setTimeout(function(){
if(emailval==get[0].email) {
alert("Request accepted, Generating OTP");
alert("Your OTP(one time password) is :-"+val);
let new1= document.getElementById("jldi").innerHTML=forgeta();
let give=()=>{
let check=document.getElementById("otp").value=val;
}
setTimeout(give,1000)
let great=()=>{
window.location.href="change.html"
}
setTimeout(great,2000)
}
else {
alert("please fill registered E-mail")
document.querySelector("#fo").innerHTML=`<button id="butt">Submit</button>`
window.location.reload();
}
},1500)
})
document.getElementById("image-b").addEventListener("click",function(){
window.location.href="loggin.html"
// console.log("hum")
})
</script>