A script for Trivia created with JavaScript. The quizzes (questions and answers) are stored in external files, in XML or JSON format.
The Trivia Game has two levels:
  • Level 1 - displays a list of answers to each quiz, and the user must click on the correct answer.
  • Level 2 - is a little more difficult because it is displayed only a text box in which the user can write the answer.
It has two modes:
  • Consecutive - the quiestions start from the quiz with index number added into a text field, and are displayed in their order till the last quiz.
  • Random - the quizzes are choosed randomly, till the last quiz, without repeat.
Also, the user can choose to play the trivia with a Countdown Timer (15 seconds to answer till the script adds automatically the next quiz).
You can easily add quizzes and multiple categories in this Trivia script, the quizzes of each category are stored in its external file (more informations are in "readme.html" file in the archive with this script).

• To Download this script, click: Trivia Game Script.

Demo Trivia

Trivia Category:

Welcome to Trivia Game

Levels:
  • Level 1 - Easy - It is displayed a list of answers to each quiz. Click the correct answer.
  • Level 2 - Difficult - It is displayed a text box in which you must write the answer, then click on Send button.
Mode
  • Consecutive - The quiestions start from the quiz with index number added into a text field, and are added in their order till the last quiz.
  • Random - The quizzes are choosed randomly, till the last quiz, without repeat.
Countdown Timer - If that button is checked, you have 15 seconds to answer till the next quiz is added automatically.

- Click the Start button to start the quizzes. The Reset button resets the Trivia.

Quizzes: 0 of

0 - Correct answers
0 - Incorrect answers

Mode

From to

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag defines the clickable areas inside the image map?
<map> <img> <area>
<img src="image.jpg" usemap="#map1">
<map name="map1">
  <area shape="rect" coords="9, 120, 56, 149" href="#">
  <area shape="rect" coords="100, 200, 156, 249" href="#">
</map>
Which CSS property defines what is done if the content in a box is too big for its defined space?
display overflow position
#id {
  overflow: auto;
}
Click on the event which is triggered when the mouse is positioned over an object.
onclick onmouseover onmouseout
document.getElementById("id").onmouseover = function(){
  document.write("Have Good Life");
}
Indicate the PHP variable that contains data added in URL address after the "?" character.
$_SESSION $_GET $_POST
if(isset($_GET["id"])) {
  echo $_GET["id"];
}
JavaScript Trivia Game

Last accessed pages

  1. innerHTML and outerHTML to Get and Replace HTML content (13732)
  2. Creating Mask Layers in Flash (3266)
  3. CKEditor Free Image Browse Plugin (6240)
  4. Working with getElementById (10249)
  5. CKEditor Free Image Uploader Addon (5158)

Popular pages this month

  1. Qwop (10555)
  2. Drag Racer V3 (6224)
  3. Flash Games - Free online Games (2161)
  4. List with All the Games (2072)
  5. Bubbles3 (1994)