-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrialsInJS.html
More file actions
32 lines (29 loc) · 1005 Bytes
/
TrialsInJS.html
File metadata and controls
32 lines (29 loc) · 1005 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset = "utf-8">
<title>wtf</title>
</head>
<body>
<button>Words</button>
<script>
const button = document.querySelector("button")
function hello () {
const access = prompt("Who are you?", "");
const password = prompt("Please enter password", "")
if (access === "Admin") {
if (password === "TheMaster") {
alert("Welcome!");
} else if (password !== "TheMaster") {
alert("Wrong Password");
} else if (password === "") {
alert("Canceled")
}
} else if (access === "") {
alert("Canceled");
} else if (access !=="Admin") {
alert("I don't know you");
}
}
button.addEventListener("click", hello)
</script>