-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathotp.html
More file actions
120 lines (113 loc) · 3.16 KB
/
otp.html
File metadata and controls
120 lines (113 loc) · 3.16 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
<!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>
<style>
#nav{
display: flex;
justify-content: space-between;
margin-top: 20px;
margin-bottom: 20px;
}
#p1{
margin-top: 30px;
margin-right: 40px;
font-size: 20px;
color: gray;
}
#main{
width: 40%;
height: 350px;
margin: auto;
background-color: rgb(214, 211, 211);
padding-top: 30px;
}
h1{
color: blue;
font-size: 25px;
text-align: center;
}
#box{
margin: auto;
margin: 30px;
}
label{
margin-top: 50px;
}
input{
margin-top: 20px;
padding: 5px;
}
button{
padding: 5px;
cursor: pointer;
}
button:hover{
background-color: aquamarine;
border: none;
}
#box>p{
margin-top: 25px;
font-size: 22px;
border: 1px solid hidden;
border-radius: 10px;
width: 45px;
text-align: center;
cursor: pointer;
background-color: rgb(72, 129, 167);
color: white;
}
</style>
</head>
<body>
<div id="nav">
<div>
<img src="https://www.bigbasket.com/static/v2489/common/img/bb_logo.png" id="navimg" alt="">
</div>
<div>
<p id="p1">1860 123 1000</p>
</div>
</div>
<hr>
<div id="main">
<h1>Please Fill The OTP For Complete Payment </h1>
<div id="box">
<lebel>OTP sended on your linked mobile number</lebel><br>
<input id="int" type="password" placeholder="Fill Here">
<button id="succ">Submit</button>
<h2 id="result"></h2>
<h2 id="tran"></h2>
<div id="final"></div>
<p id="displayok">Ok</p>
</div>
</body>
</html>
<script>
let displayok = document.querySelector("#displayok");
displayok.style.display = "none";
document.querySelector("#succ").addEventListener("click",function(){
// let BUTTON=document.createElement("button");
let otp="1234"
let OTP=document.querySelector("#int").value;
if(otp==OTP){
document.querySelector("#result").innerText="Payment Successful"
// BUTTON.innerText="OK";
displayok.style.display = "block";
document.querySelector("#tran").innerText="Your transaction id's - 2345538346834647"
BUTTON.addEventListener("click",function(){
OTP.innerText = 0;
alert("Payment successful. Thanks for shopping.!")
})
document.querySelector("#final").append(BUTTON);
}else{
alert("Oops..!!! Wrong OTP");
}
})
displayok.addEventListener("click",function(){
window.location.replace("index.html");
localStorage.removeItem("basket");
});
</script>