forked from Sushmashreeps/Front-end-Full-Stack-Development
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser Registration Form.html
141 lines (124 loc) · 4.32 KB
/
User Registration Form.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</head>
<body>
<div class="card">
<form class="form">
<p class="form-title">Sign in to your account</p>
<div class="input-container">
<input type="text" placeholder="Enter username" id="username">
<span>
</span>
</div>
<div class="input-container">
<input type="email" placeholder="Enter email" >
<span>
</span>
</div>
<div class="input-container">
<input type="password" placeholder="Enter password" id="password">
</div>
<div class="input-container">
<input type="password" placeholder="Confirm password" id="confirm-password">
</div>
<button type="submit" class="submit" onclick="validatePassword()" >
Sign in
</button>
<p class="signup-link" id="output">
No account?
<a href="">Sign up</a>
</p>
</form>
</div>
<script>
var password = document.getElementById("password"),
confirm_password = document.getElementById("confirm-password"),
output = document.getElementById("output"),
username = document.getElementById("username");
function validatePassword(){
if(password.value!= confirm_password.value) {
confirm_password.setCustomValidity("Passwords Don't Match");
} else {
confirm_password.setCustomValidity('');
alert("Passwords Matched");
alert("Welcome "+username.value);
}
}
</script>
<style>
.form {
background-color: #fff;
display: block;
padding: 1rem;
max-width: 350px;
border-radius: 0.5rem;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.form-title {
font-size: 1.25rem;
line-height: 1.75rem;
font-weight: 600;
text-align: center;
color: #000;
}
.input-container {
position: relative;
}
.input-container input,
.form button {
outline: none;
border: 1px solid #e5e7eb;
margin: 8px 0;
}
.input-container input {
background-color: #fff;
padding: 1rem;
padding-right: 3rem;
font-size: 0.875rem;
line-height: 1.25rem;
width: 300px;
border-radius: 0.5rem;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.submit {
display: block;
padding-top: 0.75rem;
padding-bottom: 0.75rem;
padding-left: 1.25rem;
padding-right: 1.25rem;
background-color: #4F46E5;
color: #ffffff;
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 500;
width: 100%;
border-radius: 0.5rem;
text-transform: uppercase;
}
.signup-link {
color: #6B7280;
font-size: 0.875rem;
line-height: 1.25rem;
text-align: center;
}
.signup-link a {
text-decoration: underline;
}
.card{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</body>
</html>