[Web-devoloper]Deaq,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script>
document.addEventListener( "DOMContentLoaded" , function() {
document.getElementById('reg').addEventListener("submit", function(event) {
event.preventDefault(); //эта строка для теста, отменяет отправку формы
let login = document.getElementById('Login').value;
let password = document.getElementById('Password').value;
if (login == '.forum/admin' && password == ".forum.c")
alert("welcome " + login);
else if (login == 'Moderator' && password == ".Modern.c")
alert("welcome " + login);
else if (login == 'user' && password == "123")
alert("welcome " + login);
else if (!login || !password)
alert("Incorrect login or password!");
})
});
</script>
</head>
<body>
<form action="" id="reg">
<input type="text" id="Login">
<input type="text" id="Password">
<input name="" type="submit" value="send">
</form>
</body>
</html>
создавайте свои темы тут
Общие вопросы Javascript