Create base login page
This commit is contained in:
12
js_login/src/script.js
Normal file
12
js_login/src/script.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const form = document.getElementById("loginForm");
|
||||
form.addEventListener("submit", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const email = document.getElementById("email").value;
|
||||
const password = document.getElementById("password").value;
|
||||
|
||||
if (email === "sesame@ouvretoi.com" && password === "topsecret")
|
||||
location.href = "/flag.txt";
|
||||
else
|
||||
alert("Identifiants incorrects, veuillez réessayer !");
|
||||
})
|
||||
Reference in New Issue
Block a user