How would i make this work without using the input button. to make it so they can hit enter and it will check the password??
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Coming...</title>
<script type="text/javascript">
function CheckMe()
{
var strPassword = document.getElementById("strPassword").value
if (strPassword == "New England Clam Chowder")
{
window.location="http://google.com"
}
else
{
alert("No Way Jose")
}
}
</script>
</head>
<body>
The Password Is: New England Clam Chowder
<form>
<input type="password" id="strPassword" size="25" />
<br />
<input type="button" onclick="CheckMe()" size="25" value="Submit" />
</form>
</body>
</html>
Comment