The Codes look like this:
<html><head><title></title>
<script language="JavaScript">
<!--
var numQues = 5;
var numChoi = 4;
var answers = new Array(5);
answers[0] = "come";
answers[1] = "hadn't arrived";
answers[2] = "had seen";
answers[3] = "has been blowing";
answers[4] = "have been married";
function getScore(form) {
var score = 0;
var currElt;
var currSelection;
for (i=0; i<numQues; i++) {
currElt = i*numChoi;
for (j=0; j<numChoi; j++) {
currSelection = form.elements[currElt + j];
if (currSelection.checked) {
if (currSelection.value == answers[i]) {
score++;
break;
}
}
}
}
score = Math.round(score/numQues*100);
form.percentage.value = score + "%";
var correctAnswers = "";
for (i=1; i<=numQues; i++) {
correctAnswers += i + ". " + answers[i-1] + "\r\n";
}
form.solutions.value = correctAnswers;
}
// -->
</script>
</head>
<body>
<form name="quiz">
1. I'll see you in August when I _____ back.
<input type="radio" name="q1" value="will come">will come
<input type="radio" name="q1" value="came">came
<input type="radio" name="q1" value="will have com">will have com
<input type="radio" name="q1" value="come">come
<p>
2. My friend _____ when the lesson started.
<input type="radio" name="q2" value="hasn't arrived">hasn't arrived
<input type="radio" name="q2" value="wasn't arrived">wasn't arrived
<input type="radio" name="q2" value="hadn't arrived">hadn't arrived
<input type="radio" name="q2" value="wasn't arriving">wasn't arriving
<p>
3. Alex didn't come to see the film last night because he _____ it before.
<input type="radio" name="q3" value="saw">saw
<input type="radio" name="q3" value="had seen">had seen
<input type="radio" name="q3" value="has seen">has seen
<input type="radio" name="q3" value="was seen">was seen
<p>
4. A cold wind _____ for the last three days.
<input type="radio" name="q4" value="has been blowing">has been blowing
<input type="radio" name="q4" value="blows">blows
<input type="radio" name="q4" value="is blowing">is blowing
<input type="radio" name="q4" value="blew">blew
<p>
5. 13. July 10th is my wedding anniversary. Next month, my husband and I will _____ for twenty years.
<input type="radio" name="q5" value="marry">marry
<input type="radio" name="q5" value="have married">have married
<input type="radio" name="q5" value="be married">be married
<input type="radio" name="q5" value="have been married">have been married
<p>
<input type="button" value="Get score" onClick="getScore(this.form)">
<input type="reset" value="Clear"><p>
Score = <input type=text size=15 name="percentage">
Correct answers:
<textarea name="solutions" wrap="virtual" rows="4" cols="40"></textarea>
</form>
</body></html>