-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassignment_web.html
More file actions
52 lines (46 loc) · 1.4 KB
/
assignment_web.html
File metadata and controls
52 lines (46 loc) · 1.4 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
<!DOCTYPE html>
<html>
<head>
<title>Catty Music</title>
<link rel="stylesheet" href="login.css">
</head>
<body>
<main>
<ul>
<li><Home/li>
<li>About</li>
<li><a href="admin.html">Student</a></li>
<li><a href ="admin.html">Staff</a></li>
<li>Login</li>
</ul>
<div class="login-block">
<h3>Admin Login</h3>
<form>
<input type="text" name="username" id="username" Placeholder="enter username"><br>
<input type="password" name="password" id="password" Placeholder="enter password"><br>
<button onclick="user1()"><a href="admin.html">Login</a></button>
</form>
</div>
<div class="login-block">
<h3>Staff Login</h3>
<form>
<input type="text" name="username" id="username" Placeholder="enter username"><br>
<input type="password" name="password" id="password" Placeholder="enter password"><br>
<button onclick="user1()">Login</button>
</form>
</div>
<script>
function user1() {
var user = document.getElementById('username').value
var pass = document.getElementById('password').value
if (user == "admin" && pass == "admin") {
window.open("admin.html")
} else {
alert('incorrect username or password')
}
}
</script>
</main>
<footer></footer>
</body>
</html>