-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (29 loc) · 1.17 KB
/
index.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
<html>
<head>
<link rel="stylesheet" href="index.css">
<title>FORM</title>
</head>
<body>
<form id ='login' >
<h1 >LOGIN </h1>
<br>
<label>USERNAME</label><br>
<input class='a' id="username" type="email"/><br>
<label>PASSWORD</label><br>
<input class='a' id ="password" type ="password"/><br>
<input class='b' onclick = "func()" type="button" value='LOGIN'/>
</form>
<script>
function func(){
var username = document.getElementById('username').value;
var password = document.getElementById('password').value;
if (username === '[email protected]' && password === 'password') {
alert('LOGIN SUCESSFULL');
window.location=('/form.html')
} else {
// Perform further actions like making an API call to authenticate the user
alert("invalid username and password")
}}
</script>
</body>
</html>