-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogical_Operators.html
More file actions
36 lines (30 loc) · 967 Bytes
/
Logical_Operators.html
File metadata and controls
36 lines (30 loc) · 967 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
33
34
35
36
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login - Logical Operators</title>
</head>
<body>
<button>Login</button>
<script>
// Create a login form for Admin, Other, and Cancel options
const button = document.querySelector("button");
function greet() {
const userId = prompt ("Who are you?");
alert(`Hello ${userId}`);
if (userId = "Admin") {
function access() {
const userPass = prompt("Please enter your password");
} } else if (userId = "") {
function accessDenied() {
const canceled = prompt("Canceled");
}
}
button.addEventListener(`click`, greet);
}
// alert - enter password
// text box Input
// if else statement for the right or wrong password
</script>
</body>
</html>