-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotp.html
88 lines (77 loc) · 2.13 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
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
<!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>Products | Mytheresa</title>
<style>
@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
body {
margin: 0;
padding: 0;
font-family: "Jost", sans-serif;
background-image: linear-gradient(to right, #8360c3, #2ebf91);
}
* {
box-sizing: border-box;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.otp-window {
background-color: white;
width: 25%;
height: auto;
padding: 20px;
border-radius: 10px;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}
.otp-window > h1 {
font-weight: 500;
text-align: center;
}
.otp > input {
width: 100%;
padding: 15px 10px;
}
#submit {
margin-top: 20px;
background-image: linear-gradient(to right, #8360c3, #2ebf91);
border: none;
color: white;
font-size: 16px;
}
</style>
</head>
<body>
<div class="container">
<div class="otp-window">
<h1>Verification Code</h1>
<form class="otp">
<label>Enter OTP</label><br />
<input type="text" name="otp" placeholder="Enter 6 digit code" />
<input type="submit" id="submit" value="Confirm OTP" />
</form>
</div>
</div>
</body>
</html>
<script>
let otp = "1234";
let otp_form = document.querySelector(".otp");
otp_form.addEventListener("submit", handleOtp);
function handleOtp(e) {
e.preventDefault();
if (otp_form.otp.value == otp) {
alert("Order Sucessfull");
localStorage.removeItem("cart");
location.href = "index.html";
} else {
alert("Invaild OTP");
}
}
</script>