1. Computing & Technology

Analysis Quiz

3. Analysis Head Script

Once the last question has been answered the resulting value will be passed to the analysis page. The first step in setting up this page is add a script to the head of the page to retrieve the final result and convert it to a precentage.

To do this select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called quizresh.js.

You now add this script to the head section of the analysis page using the following code:

<script src="quizresh.js"
type="text/javascript">
</script>

The final step in creating the analysis quiz is to create the body script for the analysis page that will display the appropriate result based on the percentage score achieved.

©2012 About.com. All rights reserved.

A part of The New York Times Company.