forked from theabhishekmaurya/tata-cliq-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
otp.html
146 lines (134 loc) · 3.87 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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!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>otp</title>
<style>
.container_otp{
display: flex;
flex-direction: column;
width: 450px;
height: 550px;
margin: auto;
margin-top: 100px;
border-radius: 45px;
font-family: sans-serif;
background: white;
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
#inside{
/* border: 1px solid; */
width: 80%;
margin-left: 1.2%;
}
#otp_close_btn{
width: 30px;
height: 25px;
border: none;
background: white;
color: grey;
font-size: 23px;
font-weight:500px;
margin: 40px 50px 0px 380px;
cursor: pointer;
/* border: 1px solid; */
}
#almost{
width: 350px;
height: 150px;
text-align: center;
margin-left: 40px;
}
#almost>p{
color: grey;
}
#otp_input{
display: flex;
width:350px;
height: 50px;
margin-left: 40px;
}
#otp_input>input{
width: 45px;
margin-right: 5px;
outline: none;
font-size: 20px;
text-align: center;
}
#edit_number{
display: flex;
width: 350px;
justify-content: space-between;
margin-left: 40px;
color: crimson;
font-weight: bold;
}
#otp_continue_btn{
border: none;
background: rgb(146,37,105);
background: linear-gradient(175deg, rgba(146,37,105,1) 35%, rgba(201,60,88,1) 66%);
width: 350px;
margin-top: 30px;
margin-left: 40px;
color: white;
padding: 10px;
font-size: 20px;
border-radius: 10px;
cursor: pointer;
}
#otp_continue_btn:hover{
background: rgb(146,37,105);
background: linear-gradient(175deg, rgba(146,37,105,1) 24%, rgba(201,60,88,1) 99%);
}
</style>
</head>
<body>
<div class="container_otp">
<div id=inside>
<button id="otp_close_btn">X</button>
<div id="almost">
<h1>Almost There</h1>
<p>Please enter the 6 digit OTP that we just
sent on your mobile number
</p>
</div>
<div id="otp_input">
<input id="in1" type="text" maxlength="1">
<input id="in2" type="text" maxlength="1">
<input id="in3" type="text" maxlength="1">
<input id="in4" type="text" maxlength="1">
<input id="in5" type="text" maxlength="1">
<input id="in6" type="text" maxlength="1">
</div>
<div id="edit_number">
<p>Edit Number</p>
<p>Resend OTP</p>
</div>
<button id="otp_continue_btn">Continue</button>
</div>
</div>
</body>
</html>
<script>
document.querySelector("#otp_continue_btn").addEventListener("click",checkOtp);
function checkOtp(){
var in1=document.querySelector("#in1").value;
var in2=document.querySelector("#in2").value;
var in3=document.querySelector("#in3").value;
var in4=document.querySelector("#in4").value;
var in5=document.querySelector("#in5").value;
var in6=document.querySelector("#in6").value;
if((in1.length==1)&&(in2.length==1)&&(in3.length==1)&&(in4.length==1)&&(in5.length==1)&&(in6.length==1)){
alert("Login Succesful")
window.location.href="loginhomepage.html";
}
else{
alert("enter correct OTP");
}
}
document.querySelector("#otp_close_btn").addEventListener("click",function(){
window.location.href="index.html";
})
</script>