<html>
<head>
<title>
self evaluating quiz</title><script LANGUAGE="Javascript">
function gradequiz() {
var msg;
var msg_wrong;
var msg_correct;
var total_correct;
quiz = document.forms.thequiz;
total_correct = 0;
msg = "";
msg_wrong = "";
msg_correct = "";
//Question 1
if (quiz.Q
1[2].checked == true) {msg_correct += "The answer to Question 1 was correct.\n";
total_correct += 1;
}
else {
msg_wrong += "The answer to Question 1 was incorrect. Try again!\n";
}
//Question 2
if (quiz.Q
2[3].checked == true) {msg_correct += "The answer to Question 2 was correct.\n";
total_correct += 1;
}
else {
msg_wrong += "The answer to Question 2 was incorrect. Try again!\n";
}
//Question
3if (quiz.Q
3[1].checked == true) {msg_correct += "The answer to Question 3 was correct.\n";
total_correct += 1;
}
else
{
msg_wrong += "The answer to Question 3 was incorrect. Try again!\n";
}
//Question
4if (quiz.Q
4[0].checked == true) {msg_correct += "The answer to Question 4 was correct.\n";
total_correct += 1;
}
else {
msg_wrong += "The answer to Question 4 was incorrect. Try again!\n";
}
msg += "You answered " + total_correct + " of 4 questions correctly.\n";
msg += msg_correct + "\n";
msg += msg_wrong;
alert(msg);
return false;
}
function testalert () {
alert ("you selected several answers");
}
//-->
</SCRIPT>
<style type="text/css">
<!--
.frm {
line-height: 14px;
font-size: 14px;
font-family: Times, Times New Roman, serif;
}
-->
</style>
</head>
<body bgcolor=#FFFFFF>
<br> <br>
<form name="thequiz" class="frm">
<p>
Select the answers to the following questions, then evaluate your answers: <o:p></o:p></p><p>
Question 1<br>The fifth month of the year is:
<br><INPUT TYPE="radio" NAME="Q
1" VALUE="1"onselect="On Select">
January<br><INPUT TYPE="radio" NAME="Q
1" VALUE="2"onselect="On Select">
March<br><INPUT TYPE="radio" NAME="Q
1" VALUE="3"onselect="On Select">
May<br><INPUT TYPE="radio" NAME="Q
1" VALUE="4"onselect="On Select">
August<br><INPUT TYPE="radio" NAME="Q
1" VALUE="5"onselect="On Select">
December<brstyle='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]>
</p><p>
Question 2<br>The tenth month of the year is:
<br><INPUT TYPE="radio" NAME="Q
2" VALUE="1"onselect="On Select">
June<br><INPUT TYPE="radio" NAME="Q
2" VALUE="2"onselect="On Select">
January<br><INPUT TYPE="radio" NAME="Q
2" VALUE="3"onselect="On Select">
August<br><INPUT TYPE="radio" NAME="Q
2" VALUE="4"onselect="On Select">
October<br><INPUT TYPE="radio" NAME="Q
2" VALUE="5"onselect="On Select">
May<brstyle='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]>
</p><p>
Question 3<br>The sixth month of the year is:
<br><INPUT TYPE="radio" NAME="Q
3" VALUE="1"onselect="On Select">
January<br><INPUT TYPE="radio" NAME="Q
3" VALUE="2"onselect="On Select">
June<br><INPUT TYPE="radio" NAME="Q
3" VALUE="3"onselect="On Select">
March<br><INPUT TYPE="radio" NAME="Q
3" VALUE="4"onselect="On Select">
December<br><INPUT TYPE="radio" NAME="Q
3" VALUE="5"onselect="On Select">
February<brstyle='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]>
</p><p>
Question 4<br>The second month of the year is:
<br><INPUT TYPE="radio" NAME="Q
4" VALUE="1"onselect="On Select">
February<br><INPUT TYPE="radio" NAME="Q
4" VALUE="2"onselect="On Select">
March<br><INPUT TYPE="radio" NAME="Q
4" VALUE="3"onselect="On Select">
May<br><INPUT TYPE="radio" NAME="Q
4" VALUE="4"onselect="On Select">
August<br><INPUT TYPE="radio" NAME="Q
4" VALUE="5"onselect="On Select">
September</p><br> <br>
<input type="button" value="Evaluate Answers" onClick="gradequiz()">
</form> </body>
</html>