Bookholder-WEB/assets/scripts/login.js

11 lines
327 B
JavaScript

function login() {
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
if (username && password) {
alert(`Logging in with\nUsername: ${username}\nPassword: ${password}`);
} else {
alert('Please fill in both fields.');
}
}