-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
69 lines (68 loc) · 2.87 KB
/
index.html
File metadata and controls
69 lines (68 loc) · 2.87 KB
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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta name="description" content="A Simple Registration Form validated by JS">
<meta charset="UTF-8" />
<title>Simple User Registration Form</title>
<link rel="stylesheet" type="text/css" href="./main.css" />
</head>
<body class="center">
<output id="errorBox"></output>
<form action="" method="GET" id="userInfo" autocomplete="off">
<h1><em>Sign</em>Up</h1>
<div class="fullname"><span>
<label for="firstName">Firstname</label><br />
<input type="text" id="firstName" placeholder="Your firstname..."
maxlength="20" required/>
</span> <span>
<label for="lastName">LastName</label><br />
<input type="text" id="lastName" placeholder="Your lastname..."
maxlength="20" required/>
</span> </div>
<div class="more"><span>
<label for="email">Email Address</label><br />
<input type="email" id="email" placeholder="examplejosh@gmail.com" required/></span>
<div><span>
<label for="gender">Gender</label><br />
<select class="input gender" id="gender">
<option value="Unknown">Unknown</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</span> <span>
<label for="dateOfBirth">Date Of Birth</label><br />
<input type="date" id="dateOfBirth" value="" />
</span></div>
</div>
<div class="password"><span>
<label for="password">Password</label><br />
<input type="password" id="password" placeholder="Min: 8 Characters..."
minlength='8' required/>
</span> <span>
<label for="confirmPassword">Confirm Password</label><br />
<input type="password" id="confirmPassword" placeholder=
"Must match password..." required/>
</span></div>
<div class="help">
<span><span>Remember me <input type="checkbox" id='remembered' /> </span>
<a href="">Forgot Password?</a></span>
</div>
</form>
<input type="submit" id="submitBtn" value="Submit" form="userInfo"/>
<input type='hidden' id="isVerified" value="false" />
</body>
<script>
let inputs = document.getElementsByTagName('input');
for (let input of inputs) {
input.addEventListener('focus', event => {
input.className ='focused';
document.querySelector(`label[for='${input.id}'`)
.className = " focused";
});
}
</script>
<script src="./validation.js"></script>
</html>