-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
64 lines (58 loc) · 2.06 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Musikalye | Login</title>
<link rel="stylesheet" href="assets/css/login.css">
<link rel="icon" type="image/x-icon" href="music-player/images/favicon.ico">
</head>
<body>
<div class="container">
<h2 class="login-title">Log in</h2>
<form action="#" method="post" name="authentication" class="login-form" id="authentication" onsubmit="return Verify()">
<div>
<label for="username">Username</label>
<input
id="username"
type="text"
placeholder="JohnDoe@12"
name="username"
required
/>
</div>
<div>
<label for="password">Password </label>
<input
id="password"
type="password"
placeholder="password"
name="password"
required
/>
</div>
<button class="btn btn--form" type="submit" value="Log in">
Log in
</button>
</form>
</div>
<script>
//Submit Button
function Verify() {
var userRef = "admin";
var passRef = "admin";
var user = document.getElementById("username").value;
var pass = document.getElementById("password").value;
if (user === userRef && pass === passRef) {
alert("Welcome to MusiKalye!");
window.location.href = "home.html"; // Redirect to home.html
return false; // Prevent form submission (optional)
} else {
alert("Incorrect username or password!");
return false; // Prevent form submission
}
};
</script>
</body>
</html>