Quiz Examples and Coding Explanation
All answers come from this page.
Format Example
<hr noshade>
<p>Format Example</p>
<form action="" method="post" name="quizForm1" id="quizForm1" Style="background-color: lightgreen; border: 1px red;">
Each paragraph tag must have a class="question" attribute, to identify it as a question for later file parsing. It has no effect on the operation of the quizz.
Text field (fill in the blanks)
The alt tag starts with the number of points for this question
Then a vertical bar
Then the answer. You can accomodate alternate spellings by adding a Vertical bar and an alternate spelling for each possible other answer to check for.<p class="question">A <input name="pageQuiz1" type="text" id="pageQuiz1" alt="10|default" points="10">
page is simply the page in any website folder which the server feeds to you when you ask for a folder/or/site without specifiying a particular page name</p>
</p>Radio Buttons:each alt tag has the single point value for the entire question
then a vertical bar
then has a "1" for correct response or a "0" for an incorrect response.<p class="question">If you already have an existing website on UMKC then you need to:<br>
<input type="radio" name="pageQuiz6" id="pageQuiz6" alt="10|1" value="add a page"> Add a page<br>
<input type="radio" name="pageQuiz6" id="pageQuiz6" alt="10|0" value="make new site"> make new site<br>
<input type="radio" name="pageQuiz6" id="pageQuiz6" alt="10|0" value="add a link"> Add a link<br>
</p>Checkboxes: use the alt tag to provide the number of points and whether it is the right answer
5|1 - a correct answer, 5 points. the "1" on the right of the vertical bar means a correct response
5|0 - a wrong answer, the "0" means a wrong answer. If checked this removes 5 points
Use the value attribute to show the answer (right or wrong)<p class="question">Check all which are typical default-page filenames:<br>
<input type="checkbox" name="pageQuiz7" id="pageQuiz7" alt="3|1" value="default.asp"> default.asp<br>
<input type="checkbox" name="pageQuiz7" id="pageQuiz7" alt="5|0" value="homey.html"> homey.html<br>
<input type="checkbox" name="pageQuiz7" id="pageQuiz7" alt="2|1" value="index.html"> index.html<br>
<input type="checkbox" name="pageQuiz7" id="pageQuiz7" alt="2|1" value="home.html"> home.html<br>
<input type="checkbox" name="pageQuiz7" id="pageQuiz7" alt="3|1" value="default.htm"> default.htm<br>
<input type="checkbox" name="pageQuiz7" id="pageQuiz7" alt="5|0" value="mycomputer.htm"> MyComputer.htm<br>
</p>
<p><input type="button" name="Submit" value="Submit" onClick="gradeQuiz(this.form, 1)">
</p>
</form>
<form action="" method="post" name="quizForm1" id="quizForm1" Style="background-color: lightgreen; border: 1px red;">
</form>