-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
27 lines (27 loc) · 864 Bytes
/
index.js
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
function transision() {
var s = document.getElementById("myText").value;
const employee = new Map();
employee.set("ASH101", "Achitya Singh");
employee.set("BJH102", "Benaiah Joseph");
employee.set("DEL103", "Danish Eqbal");
employee.set("ERS104", "Ejaz Rodrigues");
employee.set("GMA105", "Gavin Mendonza");
employee.set("HRJ106", "Helen Raj");
employee.set("NPL107", "Nitish Patel");
employee.set("JRI108", "Job Reji");
employee.set("TSL109", "Thomas Samuel");
employee.set("ZMD110", "Zen Mohammed");
let x = false;
employee.forEach((value, key) => {
if (key == s) {
x = true;
}
});
if (x) {
window.localStorage.setItem("name", s);
window.open("landing.html", "_top");
}
else {
alert("Enter correct ID!");
}
}