just some more work done

This commit is contained in:
Timothy Pidashev
2022-01-07 12:43:22 -08:00
parent 78c96c0aff
commit b26b405eca
6 changed files with 119 additions and 41 deletions

16
js/python3/login.js Normal file
View File

@@ -0,0 +1,16 @@
const loginForm = document.getElementById("login-form");
const loginButton = document.getElementById("login-form-submit");
const loginErrorMsg = document.getElementById("login-error-msg");
loginButton.addEventListener("click", (e) => {
e.preventDefault();
const username = loginForm.username.value;
const password = loginForm.password.value;
if (username === "user" && password === "web_dev") {
alert("You have successfully logged in.");
location.reload();
} else {
loginErrorMsg.style.opacity = 1;
}
})