mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 19:13:51 +00:00
just some more work done
This commit is contained in:
0
js/python3/editor.js
Normal file
0
js/python3/editor.js
Normal file
16
js/python3/login.js
Normal file
16
js/python3/login.js
Normal 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;
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user