Spaces:
Sleeping
Sleeping
Update static/scripts/login.js
Browse files- static/scripts/login.js +6 -2
static/scripts/login.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
function login() {
|
|
|
|
| 2 |
let userInput = document.getElementById("userInput");
|
| 3 |
let passInput = document.getElementById("passInput");
|
| 4 |
|
|
@@ -19,9 +20,12 @@ function login() {
|
|
| 19 |
|
| 20 |
document.addEventListener("DOMContentLoaded", (event) => {
|
| 21 |
let button = document.getElementById("submit");
|
| 22 |
-
button.addEventListener("click",
|
|
|
|
|
|
|
|
|
|
| 23 |
})
|
| 24 |
|
| 25 |
document.addEventListener("keydown", (event) => {
|
| 26 |
-
if (event.key === "Enter") {login()}
|
| 27 |
})
|
|
|
|
| 1 |
function login() {
|
| 2 |
+
console.log("Function login started")
|
| 3 |
let userInput = document.getElementById("userInput");
|
| 4 |
let passInput = document.getElementById("passInput");
|
| 5 |
|
|
|
|
| 20 |
|
| 21 |
document.addEventListener("DOMContentLoaded", (event) => {
|
| 22 |
let button = document.getElementById("submit");
|
| 23 |
+
button.addEventListener("click", function() {
|
| 24 |
+
console.log("Button pressed");
|
| 25 |
+
login();
|
| 26 |
+
})
|
| 27 |
})
|
| 28 |
|
| 29 |
document.addEventListener("keydown", (event) => {
|
| 30 |
+
if (event.key === "Enter") {console.log("Enter pressed"); login()}
|
| 31 |
})
|