-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex1.html
42 lines (41 loc) · 1.37 KB
/
index1.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bank Login</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="login-container">
<h1 style="color: rgb(132, 198, 255);">SBI Bank Login</h1>
<form id="loginForm">
<label for="username">Username</label>
<input type="text" id="username" name="Nitin" required>
<br>
<label for="password">Password</label>
<input type="password" id="password" name="1234" required>
<br>
<button type="submit">Login</button>
</form>
</div>
<script>
document.getElementById('loginForm').addEventListener('submit', function(event)
{
event.preventDefault();
let username = document.getElementById('username').value;
let password = document.getElementById('password').value;
console.log(`Username: {username}`);
console.log(`Password: {password}`);
alert('Login successful!');
if (username === 'Nitin' && password === '1234') {
alert('Login successful!');
// Redirect to the dashboard
window.location.href = 'bank dashboard.html'; // Replace with actual dashboard URL
} else {
alert('Invalid credentials. Please try again.');
}
});
</script>
</body>
</html>