PDA

View Full Version : Creating a JavaScript Quiz



xoblivionxfantasyx
11-18-2006, 08:48 PM
Hey, i was wondering if any one can help me, or give me a good link to a website, on how to make a multiple choice quiz which gives you a score and the right answers on a separate page after you are done taking the quiz. Thank-you

jscheuer1
11-20-2006, 07:27 AM
http://www.codingforums.com/showthread.php?t=62841

hdas2012
06-07-2013, 06:10 PM
You can see a tutorial for creating a dynamic quiz using JavsScript. It uses Jquery. The questions will be dynamically displayed, having a very nice look and feel.

Create Quiz using JavaScript

url: http://www.funbutlearn.com/2013/05/create-dynamic-quiz-using-google-docs.htm

danielcr1995
03-28-2015, 07:18 PM
I am confused with Javascript and want someone to make the quiz work?

I need help with finishing this code so that the questions appear one after the other and you put mouse over choice select the answer and the answer is coure green when selected,Then it will get a score that is % and have a next button.


<!-- begin snippet: js hide: false -->

<!-- language: lang-js -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Children Film and TV Quiz</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>

<body>
<center>
<button onclick="myFunction()">Restart Quiz</button>
</center>

<script>
function myFunction() {
location.reload();
}
</script>
</body>

</html>

<!-- end snippet -->

< script >
var quiztitle = "Childrens Film and TV Quiz";
var quiz = [{
"question": "Who is this?",
"image": "boo.jpg",
"choices": [
"James P. Sullivan",
"Mike Wazowski",
"Boo",
"Randall Boggs"
],
"correct": "Boo",
}, {
"question": "What is the name of The Lion from The Chronicles of Narnia: The Lion, the Witch and the Wardrobe?",
"choices": [
"Peter",
"Edmund",
"MR.Tumnus",
"Aslan"
],
"correct": "Aslan",

}, {
"question": "Who is this from Toy Story?",
"image": "woody.jpg",
"choices": [
"Buzz Lightyear",
"Woody",
"Slinky Dog",
"Rex"
],
"correct": "Woody",
}, {
"question": "In waht house did the sorting hat almost put Harry Potter in?",
"choices": [
"Slytherin",
"Hufflepuff",
"Gryffindor",
"Ravenclaw"
],
"correct": "Slytherin",
}, {
"question": "Whitch fish from finding nemo has memory loss?",
"choices": [
"Nemo",
"Gill",
"Dory",
"Peach"
],
"correct": "Dory",
}, {
"question": "What does spongebobs house look like?",
"choices": [
"Rock",
"House shaped like an Easter Island head (Moai head)",
"Anchor",
"Pineapple"
],
"correct": "Pineapple",
}, {
"question": "Which Simpsopns charictore is missing?",
"image": "missing from simpsons family.jpg",
"choices": [
"Bart",
"Marge",
"Homer",
"Lisa"
],
"correct": "Bart",
}, {
"question": "Who says let's split up gang in Scooby Doo?",
"choices": [
"Fred",
"Daphne",
"Shaggy",
"Velma"
],
"correct": "Fred",
}, {
"question": "What is the colour of the blue peter badge?",
"choices": [
"Red and green ",
"Purple and Silver",
"Orange and Gold",
"Blue and White"
],
"correct": "Blue and White",
}, {
"question": "What cartoon character is famous for saying what's up duck?",
"choices": [
"Mickey Mouse",
"Fred Flintstone",
"Bugs Bunny",
"Tom and Jerry"
],

"correct": "Bugs Bunny",
}, ];


I need the code to be programmed in javascript