mirror of
https://github.com/SinTan1729/chhoto-url
synced 2024-12-26 07:38:36 -06:00
Use more direct calls instead of setAttribute
This commit is contained in:
parent
5e4f6aa1fc
commit
a91bcc0503
1 changed files with 3 additions and 3 deletions
|
@ -53,8 +53,8 @@ const showAlert = async (text, col) => {
|
||||||
document.getElementById("alert-box")?.remove();
|
document.getElementById("alert-box")?.remove();
|
||||||
const controls = document.querySelector(".pure-controls");
|
const controls = document.querySelector(".pure-controls");
|
||||||
const alertBox = document.createElement("p");
|
const alertBox = document.createElement("p");
|
||||||
alertBox.setAttribute("id", "alert-box");
|
alertBox.id = "alert-box";
|
||||||
alertBox.setAttribute("style", `color:${col}`);
|
alertBox.style.color = col;
|
||||||
alertBox.innerHTML = text;
|
alertBox.innerHTML = text;
|
||||||
controls.appendChild(alertBox);
|
controls.appendChild(alertBox);
|
||||||
};
|
};
|
||||||
|
@ -176,7 +176,7 @@ const submitLogin = () => {
|
||||||
} else {
|
} else {
|
||||||
const wrongPassBox = document.getElementById("wrong-pass");
|
const wrongPassBox = document.getElementById("wrong-pass");
|
||||||
wrongPassBox.innerHTML = "Wrong password!";
|
wrongPassBox.innerHTML = "Wrong password!";
|
||||||
wrongPassBox.setAttribute("style", "color:red");
|
wrongPassBox.style.color = "red";
|
||||||
password.focus();
|
password.focus();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue