-
Notifications
You must be signed in to change notification settings - Fork 0
/
otp.html
119 lines (116 loc) · 4.19 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
<!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" />
<link href="/your-path-to-fontawesome/css/all.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<title>Netmeds Clone</title>
</head>
<body>
<!-- nav section start -->
<nav class="nav">
<div class="nav1 center">
<img
src="https://www.netmeds.com/assets/gloryweb/images/home-logo-netmeds-new.svg"
alt=""
onclick="window.location.href='home.html'"
/>
</div>
<div class="nav2">
<select id="">
<option value="">Deliver to <span>110008</span></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
</select>
<input type="search" name="" id="" />
</div>
<div class="flex nav3">
<p><i class="fa fa-upload"></i>Upload Rx</p>
<p><i class="fa fa-cart-plus"></i> Cart</p>
<p>
<i class="fa fa-user-circle"></i>
<span onclick="window.location.href='signup.html'">Sign In</span> /
<span onclick="window.location.href='signup.html'"> Sign up</span>
</p>
</div>
</nav>
<!-- sign up section -->
<section id="signup-section">
<div class="box1">
<img
src="https://www.netmeds.com/images/cms/wysiwyg/cms/1588773798_sign-in-banner-new.png"
alt=""
/>
</div>
<div class="box2">
<h4>Create Account</h4>
<form id="otp-form">
<p class="otp-heading">EMAIL ID</p>
<input type="email" placeholder="Enter your email id" id="email" />
<br />
<p class="otp-heading">FIRST NAME</p>
<input
type="text"
placeholder="Enter your first name"
id="firstName"
/>
<p class="otp-heading">Last Name</p>
<input type="text" placeholder="Enter your last name" id="lastName" />
<p id="verify-otp">VERIFYING NUMBER</p>
<div class="flex">
<p id="number-otp">We have sent 6 digit OTP on +91-1234567890</p>
<p id="change-number" onclick="window.location.href='signup.html'">
Change
</p>
</div>
<input type="number" placeholder="Enter OTP" id="enter-otp" />
<p id="otpOut"></p>
<input type="submit" value="VERIFY" />
</form>
</div>
</section>
<p style="text-align: center; font-size: 13px">
By continuing you agree to our <a href="#">Terms of service</a> <br />
and <a href="">Privacy & Legal Policy</a>.
</p>
</body>
<script>
document.querySelector("form").addEventListener("submit", myForm);
var userStack = JSON.parse(localStorage.getItem("userDataMedical")) || [];
function myForm(event) {
event.preventDefault();
var email = document.querySelector("#email").value;
var firstName = document.querySelector("#firstName").value;
var lastName = document.querySelector("#lastName").value;
var otp = document.querySelector("#enter-otp").value;
console.log(email, firstName, lastName, otp);
var userData = {
email: email,
firstName: firstName,
lastName: lastName,
otp: otp,
};
userStack.push(userData);
//console.log(userStack);
localStorage.setItem("userDataMedical", JSON.stringify(userStack));
if (otp == "12345") {
window.location.href = "home.html";
} else {
document.querySelector("#otpOut").textContent = "WRONG OTP...";
}
}
</script>
</html>