Im having trouble declining the user access to the webpage based on what they put in for the password. Ive made it so, that if they put admin as the password, the page will display a div, but its not working. can someone help me find the problem.
<input id="passwordInput" type="password" value="">
<button id='signInButt'>SIGN IN</button>
<script>
var signInButt = document.getElementById('signInButt');
signInButt.addEventListener('click', function () {
if (passwordInput == "admin") {
signInPage.style.display = 'none';
menuPage.style.display = 'block';
dontHaveAccount1.innerHTML = usernameInput.value;
} else {
alert("wrong password");
}
});
</script>
Aucun commentaire:
Enregistrer un commentaire