Not to familiar with the javascript and html but onsubmit i am trying to see if the input called password is equal to "hello" then go to "loginsuccessful.html" else go to "loginfailed.html"
<!doctype html>
<html>
<head>
<title>Login</title>
</head>
<body>
<form method=post action="loginsuccessful.html" onsubmit=checkpassword(password)>
<p><label> Password <input name=password></label></p>
<p><label> Nothing </label></p>
<p><input type=submit value="Login"></p>
</form>
<Script>
function checkpassword(var1)
{
if var1 = "hello" then return true else "loginfailed.html"
}
</Script>
</body>
</html>
Bookmarks