Multiple Choice Quiz | JavaScriptSource

Multiple Choice Quiz

James Crooke Dec 27, 2005
Add a quiz to your Web page without using a server-side script. Easy to set-up. Questions and answers are stored in a multi-dimensional array format in an external file. The quiz is marked in real time, and once answered, questions are set to read-only. A summary of the users score is alerted at the end.

Download the graphics file below, unzip, and place in directory with quiz:

The JavaScript Source: Miscellaneous : Multiple Choice Quiz

Simply click inside the window below, use your cursor to highlight the script, and copy [Control]+C the script into a new file in your text editor (such as Note Pad) and save [Control+S]. The script is yours!!!

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response


Hey, thanks for sharing this. This isn't coming together for me. I ended up with three files, one html and two separate .js files. All of them stored in the same folder. When I run the code though it isn't loading...

Euan Walters Feb 8, 2017

when i copy this code to my page or even an empty notepad , is not working. only he display "submit bottons.." and the normal code! Any helpers here!!

Looskey Dec 31, 2016

Thank you for posting this script! Currently, I'm using this to create some practice exams and quizzes for phlebotomy students. However, is there a way to randomize the questions so when the students access the quiz the questions are different? I'm new to javascript (my experience lies with straight HTML). Thank you! Colby

Colby Sep 11, 2016

Excellent articulate explanation of how to use native HTML5 with JavaScript! I teach English as a foreign language. Can the individual correct/incorrect icons be postponed and the score entered as a final total subject still to all questions being answered?

Jim May 5, 2016

Can I add images in questions or answers of the quiz. Also can I add Sub and Superscript. If yes then how?

Sanchit Mar 30, 2016