Евгений Базаров,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script>
window.addEventListener('DOMContentLoaded', function() {
var form = document.querySelector('form'),
password = form.querySelector('[type="password"]');
form.addEventListener('submit', function(event) {
password.value != "12345" && event.preventDefault();
},false);
});
</script>
</head>
<body>
<form method="get" action="1.html">
<input type="password" value="Пароль" autofocus required>
<input type="submit" value="ВОЙТИ" >
</form>
</body>
</html>