WebFM/resources/js/passwordFieldInsert.js

23 lines
608 B
JavaScript
Raw Normal View History

const createPassField = (data) => {
let passField = document.createElement("INPUT");
let submitBttn = document.createElement("BUTTON");
passField.id = "PASSWD";
passField.type = "password";
passField.placeholder = "Password...";
submitBttn.innerHTML = "Submit";
insertArea.innerHTML = "";
passField.onkeyup = (eve) => {
if (eve.key == "Enter") {
getDir("./");
}
};
submitBttn.onclick = () => {
getDir("./");
};
insertArea.appendChild(passField);
insertArea.appendChild(submitBttn);
}