-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs.js
39 lines (33 loc) · 1.37 KB
/
js.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function login() {
document.getElementById("signup").style.backgroundColor = "var(--nord3)";
document.getElementById("login").style.backgroundColor = getComputedStyle(
document.querySelector(":root")
).getPropertyValue("--nord1");
}
function signup() {
document.getElementById("login").style.backgroundColor = getComputedStyle(
document.querySelector(":root")
).getPropertyValue("--nord3");
document.getElementById("signup").style.backgroundColor = getComputedStyle(
document.querySelector(":root")
).getPropertyValue("--nord1");
}
document.getElementById("login").addEventListener("mousedown", () => {
document.getElementById("login").style.backgroundColor = "var(--nord2)";
});
document.getElementById("login").addEventListener("mouseup", () => {
document.getElementById("login").style.backgroundColor = "var(--nord1)";
});
document.getElementById("signup").addEventListener("mousedown", () => {
document.getElementById("signup").style.backgroundColor = "var(--nord2)";
});
document.getElementById("signup").addEventListener("mouseup", () => {
document.getElementById("signup").style.backgroundColor = "var(--nord1)";
});
document.getElementById("login-form").addEventListener("submit", (e) => {
e.preventDefault();
alert(
document.getElementById("uName").value +
document.getElementById("pWord").value
);
});