xjippyx
12-08-2009, 06:33 PM
I will be completely up front about this, its school work. At the end of a basic html class I missed several classes for family reasons and missed just about everything on Javascript. The book we used basically didnt cover anything over it, was all in class learning I missed. Anyone who could help would be so helpful.
One function is partial, one is blank, thats what is supposed to be added/corrected to the following code
<html>
<head>
<script language="javascript" type="text/javascript">
function processScore()
{
var score = 0;
if ( ...checked)
{score = score + 1;}
if (...checked)
{score = score + 1;}
document.answerForm.score.value = score;
// Display the correct answers
document.answerForm.answer1.value = " "; // put the correct value here
document.answerForm.answer2.value = " "; // put the correct value here
} //End of function processScore
function clearForm()
{
// using the a javascript method clear all forms
}
</script>
</head>
<body style="font-family:tahoma; font-size:15px; line-height:200%; width:80%; margin-left:auto; margin-right:auto;">
<hr color="red" width="60%" size="5">
<form name="question1" id="question1">
1. Which of the following is the document considered to be?<br/>
<input type = "radio" name="choiceRB">
a. object<br />
<input type = "radio" name="choiceRB">
b. property<br />
<input type = "radio" name="choiceRB">
c. method<br />
</form>
<hr color="green" width="60%" size="5">
<form name="question2" id="question2">
2. Which method of the window can be used to display a message to the user?<br/>
<input type = "radio" name="choiceRB">
a. display()<br />
<input type = "radio" name="choiceRB">
b. message()<br />
<input type = "radio" name="choiceRB">
c. alert()<br />
</form>
<hr color="red" width="60%" size="5">
<input type="button" value="Grade the Quiz" onclick=?> <input type="button" value="Start Over" onclick=?>
<form name="answerForm" id="answerForm">
<p><strong>Correct Answers:</strong><br/></p>
Question 1: <input type="text" name="answer1" size="1"><br />
Question 2: <input type="text" name="answer2" size="1"><br />
<p>You scored <input type="text" name="score" size = "1"> out of 2</p>
</form>
<br />
</body>
</html>
thnx in advance to anyone who can help
One function is partial, one is blank, thats what is supposed to be added/corrected to the following code
<html>
<head>
<script language="javascript" type="text/javascript">
function processScore()
{
var score = 0;
if ( ...checked)
{score = score + 1;}
if (...checked)
{score = score + 1;}
document.answerForm.score.value = score;
// Display the correct answers
document.answerForm.answer1.value = " "; // put the correct value here
document.answerForm.answer2.value = " "; // put the correct value here
} //End of function processScore
function clearForm()
{
// using the a javascript method clear all forms
}
</script>
</head>
<body style="font-family:tahoma; font-size:15px; line-height:200%; width:80%; margin-left:auto; margin-right:auto;">
<hr color="red" width="60%" size="5">
<form name="question1" id="question1">
1. Which of the following is the document considered to be?<br/>
<input type = "radio" name="choiceRB">
a. object<br />
<input type = "radio" name="choiceRB">
b. property<br />
<input type = "radio" name="choiceRB">
c. method<br />
</form>
<hr color="green" width="60%" size="5">
<form name="question2" id="question2">
2. Which method of the window can be used to display a message to the user?<br/>
<input type = "radio" name="choiceRB">
a. display()<br />
<input type = "radio" name="choiceRB">
b. message()<br />
<input type = "radio" name="choiceRB">
c. alert()<br />
</form>
<hr color="red" width="60%" size="5">
<input type="button" value="Grade the Quiz" onclick=?> <input type="button" value="Start Over" onclick=?>
<form name="answerForm" id="answerForm">
<p><strong>Correct Answers:</strong><br/></p>
Question 1: <input type="text" name="answer1" size="1"><br />
Question 2: <input type="text" name="answer2" size="1"><br />
<p>You scored <input type="text" name="score" size = "1"> out of 2</p>
</form>
<br />
</body>
</html>
thnx in advance to anyone who can help