-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.html
63 lines (61 loc) · 2.2 KB
/
login.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
<!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>Register/Login</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="background">
<div class="box signin">
<h2>Already have an account ?</h2>
<button class="signinBtn">Sign in</button>
</div>
<div class="box signup">
<h2>Don't have an account ?</h2>
<button class="signupBtn">Sign up</button>
</div>
</div>
<div class="formB">
<div class="form signinForm">
<form>
<h3>Sign In</h3>
<input type="text" placeholder="Username">
<input type="password" placeholder="Password">
<input type="submit" value="Login">
<a href="#" class="forgot">Forgot Password</a>
</form>
</div>
<div class="form signupForm">
<form>
<h3>Sign Up</h3>
<input type="text" placeholder="Username">
<input type="text" placeholder="Email Address">
<input type="password" placeholder="Password">
<input type="password" placeholder="Confirm Password">
<input type="submit" value="Register">
</form>
</div>
</div>
</div>
<script>
const signinBtn = document.querySelector('.signinBtn');
const signupBtn = document.querySelector('.signupBtn');
const formB = document.querySelector('.formB');
const body=document.querySelector('body');
signupBtn.onclick=function()
{
formB.classList.add('active')
body.classList.add('active')
}
signinBtn.onclick=function()
{
formB.classList.remove('active')
body.classList.add('active')
}
</script>
</body>
</html>