NEED HTML HELP!!!! FREE 10 POINTS AND A...

Clarke S

New member
...COOKIE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!? I cant get my stupid program to work
i need it to display different outputs depending on the x variable
but it always displays the you're failing output =/ any ideas?

<html>
<head>
<title> Control Structures </title>
<script language="javascript">
var fullname=null;
var mark,x=null;
var nl="<BR>"
fullname = prompt("Please enter your first and last name");
mark = prompt("Please enter your score in this course - ICS3M");
alert("Welcome to my Website" + " " + fullname + "\n" + " " + "Your score is" + " " + mark);
</script>
</head>
<body>
<center>
<h1>
<script language="javascript">
document.write("Hi" + " " + fullname +nl);
document.write("Your score is" + " " + mark +nl);
if((x>=0) && (x<50))
{
document.write("You are at level zero. You FAIL" + nl);
}
else if (x===50)
{
document.write("Your score is exactly PASSING");
}
else if((x>=50) && (x<60))
{
document.write("You are at level 1" + nl);
}
else if((x>=60) && (x<70))
{
document.write("You are at level 2" + nl);
}
else if((x>=70) && (x<80))
{
document.write("You are at level 3" + nl);
}
else if((x>=80) && (x<=100))
{
document.write("You are at the maximum level which is level 4" + nl);
}
else
{
document.write("YOU ENTERED INVALID RANGE OF SCORE" + nl);
}
</script>
</body>
</html>
 
Back
Top