-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.jsp
33 lines (31 loc) · 1.05 KB
/
index.jsp
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
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
</head>
<body>
<h1>Login</h1>
<form id="loginForm">
<label for="loginId">Login ID:</label>
<input type="text" id="loginId" name="login_id" required>
<br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<br>
<button type="button" onclick="authenticate()">Login</button>
</form>
<script>
function authenticate() {
const loginId = document.getElementById("loginId").value;
const password = document.getElementById("password").value;
// Replace this with an actual API call to authenticate the user
// For this example, we assume the credentials are correct
if (loginId === "[email protected]" && password === "Test@123") {
window.location.href = "customerList.jsp";
} else {
alert("Invalid credentials. Please try again.");
}
}
</script>
</body>
</html>