function Load()
{
setTimeout(async() =>
{
await Myconfirmselect(
"Хранилище пустое!" + "¤" +
"Создать хранилище в браузере" + "¥" + "Inls();" + "º" +
"Выбрать файл хранилища" + "¥" + "Editselfile('.txt', false, 'Import&');"
);
alert("!");
}, 500);
}
async function Myconfirmselect(VarInput)
{
await new Promise(resolve =>
{
document.querySelector("dialog").innerHTML += `
<div>
<textarea></textarea>
</div>
`;
document.querySelector("dialog").style.textAlign = "center";
document.querySelector("dialog").querySelector("div").querySelector("textarea").style.width = "100%";
document.querySelector("dialog").querySelector("div").querySelector("textarea").style.textAlign = "center";
document.querySelector("dialog").querySelector("div").querySelector("textarea").style.resize = "none";
document.querySelector("dialog").querySelector("div").querySelector("textarea").readOnly = true;
document.querySelector("dialog").querySelector("div").querySelector("textarea").value = VarInput.split("¤")[0];
for (var i = 0; i < VarInput.split("¤")[1].split("º").length; i++)
{
var VarButton = document.createElement("button");
VarButton.textContent = VarInput.split("¤")[1].split("º")[i].split("¥")[0];
VarButton.id = VarInput.split("¤")[1].split("º")[i].split("¥")[1];
VarButton.style.marginLeft = "10px";
VarButton.style.marginTop = "10px";
VarButton.addEventListener("click", () =>
{
eval(event.target.id);
ButtonClosealert();
});
document.querySelector("dialog").querySelector("div").appendChild(VarButton);
}
function ButtonClosealert()
{
document.querySelector("dialog").style.animation = "AnimFormHide 0.1s both";
setTimeout(() =>
{
document.querySelector("dialog").style.textAlign = "initial";
document.querySelector("dialog").removeChild(document.querySelector("dialog").querySelector("div"));
document.querySelector("dialog").close();
}, 100);
}
document.querySelector("dialog").style.animation = "AnimFormShow 0.25s both";
document.querySelector("dialog").showModal();
Bye();
function Bye()
{
if (!document.querySelector("dialog").open)
{
setTimeout(resolve, 100);
}
else
{
setTimeout(Bye, 100);
}
}
});
}
<form id="FormId" action="noimages/send.php" method="post">
<input required name="InputFIO">
<input required name="InputPhone">
<input required name="InputEmail">
<button>gg</button>
</form>