-
Notifications
You must be signed in to change notification settings - Fork 3
/
otp.html
52 lines (51 loc) · 1.24 KB
/
otp.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
<!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>
#otp {
width: 40%;
margin: auto;
border-radius: 5px;
border: 2px solid saddlebrown;
box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
background-color: rgb(220, 228, 225);
}
input {
display: block;
width: 50%;
margin: auto;
border-radius: 10px;
padding: 10px;
margin-top: 15px;
}
input:nth-of-type(2)
{
background-color: greenyellow;
}
</style>
</head>
<body>
<div id="otp">
<form id="form">
<input placeholder="enter OTP" type="text" id="otp"><br>
<input type="submit">
</form>
</div>
</body>
</html>
<script>
document.querySelector("form").addEventListener("submit",function(){
event.preventDefault()
if(form.otp.value=="1234")
{
alert("Your order is successful")
window.location.href="homePage.html"
}
else
alert("Wrong OTP")
})
</script>