-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathenterotp.html
97 lines (96 loc) · 2.85 KB
/
enterotp.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!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>enter otp</title>
<style>
*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(90deg,rgb(153, 0, 255),red);
}
body>div{
width: 400px;
height: 300px;
padding: 25px 25px;
background-color: antiquewhite;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
h2{
text-align: center;
color: blueviolet;
}
input{
width:50px;
border: none;
border-bottom: 1px solid black;
outline: none;
text-align: center;
height: 40px;
font-size: 25px;
background-color: antiquewhite;
}
#otp{
display: flex;
justify-content: center;
align-items: center;
margin-top: 18%;
}
p{
text-align: center;
margin-top: 25px;
}
button{
display: block;
margin: auto;
padding: 5px 25px;
border-radius: 5px;
margin-top: 25px;
font-size: 18px;
border: 1px solid grey;
cursor: pointer;
background-color: yellowgreen;
}
button:hover{
color: aqua;
}
</style>
</head>
<body>
<div>
<h2>Enter your OTP</h2>
<div id="otp">
<input type="text" maxlength="1" id="first">
<input type="text" maxlength="1" id="second">
<input type="text" maxlength="1"id="third">
<input type="text" maxlength="1" id="fourth">
</div>
<button id="btn">Enter</button>
<p> Have not received the OTP ?<a href="payment.html">Resend</a></p>
</div>
</body>
</html>
<script>
document.getElementById("btn").addEventListener("click",myfun);
function myfun(){
if(document.getElementById("first").value=="1"&&document.getElementById("second").value=="2"&& document.getElementById("third").value=="3"&&document.getElementById("fourth").value=="4" ){
alert("Payment Successful");
window.location.href="confimation.html";
}else{
alert("OTP does not match");
}
document.getElementById("first").value="";
document.getElementById("second").value="";
document.getElementById("third").value="";
document.getElementById("fourth").value="";
}
</script>