-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTESTMUL.html
25 lines (25 loc) · 985 Bytes
/
TESTMUL.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
<head>
<title>Login page</title>
</head>
<body>
<h1>Simple Login Page</h1>
<form name="login">
Username<input type="text" name="userid"/>
Password<input type="password" name="pswrd"/>
<input type="button" onclick="check(this.form)" value="Login"/>
<input type="reset" value="Cancel"/>
</form>
<script language="javascript">
function check(form) { /*function to check userid & password*/
/*the following code checkes whether the entered userid and password are matching*/
if(form.userid.value == "NGM" && form.pswrd.value == "MLP") {
window.open('index.html')/*opens the target page while Id & password matches*/
close()
}
else {
alert("Error Password or Username")/*displays error message*/
}
}
</script>
</body>
</html>