-
Notifications
You must be signed in to change notification settings - Fork 0
/
password.html
49 lines (46 loc) · 1.61 KB
/
password.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
<html>
<head>
<link rel="stylesheet" href="stylesheet.css">
<title>Computer Science Website</title>
<link rel="shortcut icon" href="icon.png">
<script>
function a() {
console.log("pressed")
document.getElementById("form").style.display = "none";
}
</script>
</head>
<body>
<div id="form" style="text-align: center; margin: 0 auto; background: rgba(0, 0, 0, 0.3); position: fixed; z-index: 1; width: 100%; height: 100%; pointer-events: none;">
<form style="padding-top: 20vh;">
<h1>Login</h1>
<label for="email"><b>Email</b></label><br>
<input style="pointer-events:auto;" type="text" placeholder="Enter Email" name="email" required><br>
<label for="psw"><b>Password</b></label><br>
<input style="pointer-events:auto;" type="password" placeholder="Enter Password" name="psw" required><br>
<button style="pointer-events:auto;" type="submit">Login</button><br>
<button style="pointer-events:auto;" type="button" onclick="a()">Close</button>
</form>
</div>
<h2>Password Prompt</h2>
<button onclick="password()">Back</button>
<p><span class="span1">aaa</span></p>
<script>
function password() {
let pass = prompt("Please enter your password:", "");
if (pass == null || pass == "") {
console.log("cancelled")
}
else {
if (pass === "password") {
console.log("correct")
location.assign("about.html");
}
else {
console.log("incorrect")
}
}
}
</script>
</body>
</html>