I am having difficulty with the answer provided here, but I couldn't understand how to implement it. My code is pretty much identical:
<script language="javascript">
function check(form) {
if(form.userName.value == "User" && form.userPass.value == "averyobviouspassword") {
window.open('testok/menu.html')
}
else {
alert("Wrong Password Or Username")
}
}
</script>
The problem with this is, if you were to Inspect Element on the page, you can plainly see the password. I'm not looking for other solutions like a SQL database, because this is just a test website. The solution I thought might work was this:
if(hash(enteredPassword) == storedHash)
I just don't know how to implement it.