I am completely at a loss for why this simple (and stupid) quiz game won't run
Here is the javascript text
Also here is the HTML file, for those who want it http://cl.ly/4GeG
Here is the javascript text
Code:
<html>
<head>
<title>Atlas Test Script</title>
<script type="text/javascript">
perfectNumber = 2;
function checkSlices(numSlices)
{
if (numSlices == perfectNumber)
{
alert("Congratulations, You got it! ");
}
else if (numSlices > perfectNumber)
{
alert("Too Many!");
}
else if (numSlices < perfectNumber);
{
alert("Too Few!");
}
else
{
alert("You're Crazy!");
}
}
</script>
</head>
<body>
<h3>How many slices of pizza did you eat?</h3>
<form method="POST" name="slicesForm" onSubmit="checkSlices(document.slicesForm.numSlices.value);">
<input type="text" name="numSlices" id="numSlices" />
<input type="Submit" name="Submit" />
</form>
</body>
</html>
Also here is the HTML file, for those who want it http://cl.ly/4GeG
Last edited by a moderator: