Login Page
SOLUTION....
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>Login</title>
<link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”>
<script>
function validateLogin() {
let email = document.getElementById(“email”).value;
let pass = document.getElementById(“password”).value;
if (email == “” || pass == “”) {
alert(“Please fill all fields!”);
return false;
}
alert(“Login Successful!”);
return true;
}
</script>
</head>
<body>
<div class=”container mt-5″>
<h2>Login Form</h2>
<form onsubmit=”return validateLogin()”>
<div class=”form-group”>
<label>Email:</label>
<input type=”email” id=”email” class=”form-control”>
</div>
<div class=”form-group”>
<label>Password:</label>
<input type=”password” id=”password” class=”form-control”>
</div>
<button type=”submit” class=”btn btn-primary”>Login</button>
</form>
</div>
</body>
</html>
