-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotpverify.js
41 lines (27 loc) · 967 Bytes
/
otpverify.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
// alert("jhvlng")
document.querySelector(".otp").addEventListener("click", verifyfunc)
// let usernumber= JSON.parse(localStorage.getItem("userdata"))
let number= JSON.parse(localStorage.getItem("onetimedata"))
// let number1= JSON.parse(localStorage.getItem("userarr"))
number.filter(function (ele){
document.querySelector(".num").innerHTML= ele.number
})
function verifyfunc(){
let getotp= document.querySelector("input").value
if(getotp==1234){
alert("sign Up successful")
window.location.href="login.html"
}else{
alert("Otp not match")
// window.location.href="signup.html"
location.reload()
}
// console.log(getotp)
// location.reload()
// let loginpage= document.querySelector("input").value
// if(loginpage==1234){
// alert("login successful")
// }else{
// alert("login failed")
// }
}