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