Script Categories

Miscellaneous >>> User Quiz.

If you'd like to present your visitors with a JavaScript quiz, this script would be perfect. It administers and scores the test, and even catches the user if they try to cheat! You can even make additional quizzes for it to continue with after the first quiz.

Gamer's Quiz

Objective: answer 7 questions correctly. JavaScript required!

1. WARM-UP: Who created the famous WarCraft 2?

Sierra On-Line
Blizzard Entertainment

2. This famous 3D shooter claimed PC Gamer's Game of 1994 Award.

Wolfenstein 3D

3. The first intergalatic combat game. Name it.

Master of Orion
Star Control
Star Trek

4. The game ever to contain graphics was this classic by Roberta Williams.

King's Quest
Mystery House
Time Zone
Mission: Asteriod

5. The first real-time strategy game was:

WarCraft: Orcs & Humans
Command & Conquer
Dune 2

6. In PC Gamer, Quake won these 'of-the-year' awards (1996):

Best Game, Best Action Game
Best Action Game, Best Multiplayer
Best Sound Effects, Best Multiplayer
All of the above

7. The best selling game of all time is:

WarCraft 2
C&C: Red Alert
Sim City
King's Quest 5

8. This is a turn-based strategy game:

C&C: Red Alert
Might and Magic 3
Heroes of Might and Magic
Daggerfall: The Elder Scrolls

9. PC Gamer's Best Game of the 1996 went to:

C&C: Red Alert
Tomb Raider
Civilization 2

10. Blizzard's new release, Diablo is a:

Role Playing Game
2D Action Game
3D Action Game

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http : // / for full source code
and get more free JavaScript, CSS and DHTML scripts ! */
<!-- Original : Monichar -->
<!-- Begin
var ans = new Array;
var done = new Array;
var score = 0;
ans[1] = "c";
ans[2] = "a";
ans[3] = "b";
ans[4] = "b";
ans[5] = "d";
ans[6] = "c";
ans[7] = "c";
ans[8] = "c";
ans[9] = "d";
ans[10] = "a";
function Engine( question, answer )
if ( answer != ans[question] )
if ( ! done[question] )
done[question] = - 1;
alert( "Wrong!\n\nYour score is now: " + score );
alert( "You have already answered that!" );
if ( ! done[question] )
done[question] = - 1;
score ++ ;
alert( "Correct!\n\nYour score is now: " + score );
alert( "You have already answered that!" );

function NextLevel ()
if ( score > 10 )
alert( "Cheater!" );
if ( score >= 7 && score <= 11 )
alert( "Access permitted! But there are no more levels if you don't make any ...")

// change previous line to : self.location = "js_misc_userquiz2.html" if you make more

alert( "Access denied! You need 7 points to enter the next level." )
// End -->
<font size=6 face=Arial>Gamer's Quiz</font><br><br>
<b>Objective: answer 7 questions correctly. JavaScript required!</b><br>
<noscript>JavaScript is <b><i>disabled</b></i>. Get Netscape 3.0 or turn it on!</noscript>
<hr noshade>
<b>1. WARM-UP: Who created the famous <i>WarCraft 2</i>?</b><br><br>
<input type=radio value="a" onClick="Engine(1, this.value)">Sierra On-Line<br>
<input type=radio value="b" onClick="Engine(1, this.value)">BlueByte<br>
<input type=radio value="c" onClick="Engine(1, this.value)">Blizzard Entertainment<br>
<input type=radio value="d" onClick="Engine(1, this.value)">Microsoft<br><br>
<b>2. This famous 3D shooter claimed <i>PC Gamer's</i> Game of 1994 Award.</b><br><br>
<input type=radio value="a" onClick="Engine(2, this.value)">Doom<br>
<input type=radio value="b" onClick="Engine(2, this.value)">Hexen<br>
<input type=radio value="c" onClick="Engine(2, this.value)">Descent<br>
<input type=radio value="d" onClick="Engine(2, this.value)">Wolfenstein 3D<br><br>
<b>3. The first intergalatic combat game. Name it.</b><br><br>
<input type=radio value="a" onClick="Engine(3, this.value)">Master of Orion<br>
<input type=radio value="b" onClick="Engine(3, this.value)">Star Control<br>
<input type=radio value="c" onClick="Engine(3, this.value)">StarCraft<br>
<input type=radio value="d" onClick="Engine(3, this.value)">Star Trek<br><br>
<b>4. The game ever to contain graphics was this classic by Roberta Williams.</b><br><br>
<input type=radio value="a" onClick="Engine(4, this.value)">King's Quest<br>
<input type=radio value="b" onClick="Engine(4, this.value)">Mystery House<br>
<input type=radio value="c" onClick="Engine(4, this.value)">Time Zone<br>
<input type=radio value="d" onClick="Engine(4, this.value)">Mission: Asteriod<br><br>
<b>5. The first real-time strategy game was: </b><br><br>
<input type=radio value="a" onClick="Engine(5, this.value)">WarCraft: Orcs & Humans<br>
<input type=radio value="b" onClick="Engine(5, this.value)">Command & Conquer<br>
<input type=radio value="c" onClick="Engine(5, this.value)">Dune<br>
<input type=radio value="d" onClick="Engine(5, this.value)">Dune 2<br><br>
<b>6. In PC Gamer, Quake won these 'of-the-year' awards (1996): </b><br><br>
<input type=radio value="a" onClick="Engine(6, this.value)">Best Game, Best Action Game<br>
<input type=radio value="b" onClick="Engine(6, this.value)">Best Action Game, Best Multiplayer<br>
<input type=radio value="c" onClick="Engine(6, this.value)">Best Sound Effects, Best Multiplayer<br>
<input type=radio value="d" onClick="Engine(6, this.value)">All of the above<br><br>
<b>7. The best selling game of all time is: </b><br><br>
<input type=radio value="a" onClick="Engine(7, this.value)">WarCraft 2<br>
<input type=radio value="b" onClick="Engine(7, this.value)">C&C: Red Alert<br>
<input type=radio value="c" onClick="Engine(7, this.value)">Sim City<br>
<input type=radio value="d" onClick="Engine(7, this.value)">King's Quest 5<br><br>
<b>8. This is a turn-based strategy game: </b><br><br>
<input type=radio value="a" onClick="Engine(8, this.value)">C&C: Red Alert<br>
<input type=radio value="b" onClick="Engine(8, this.value)">Might and Magic 3<br>
<input type=radio value="c" onClick="Engine(8, this.value)">Heroes of Might and Magic<br>
<input type=radio value="d" onClick="Engine(8, this.value)">Daggerfall: The Elder Scrolls<br><br>
<b>9. PC Gamer's <i>Best Game of the 1996</i> went to: </b><br><br>
<input type=radio value="a" onClick="Engine(9, this.value)">C&C: Red Alert<br>
<input type=radio value="b" onClick="Engine(9, this.value)">Tomb Raider<br>
<input type=radio value="c" onClick="Engine(9, this.value)">Quake<br>
<input type=radio value="d" onClick="Engine(9, this.value)">Civilization 2<br><br>
<b>10. Blizzard's new release, <i>Diablo</i> is a: </b><br><br>
<input type=radio value="a" onClick="Engine(10, this.value)">Role Playing Game<br>
<input type=radio value="b" onClick="Engine(10, this.value)">2D Action Game<br>
<input type=radio value="c" onClick="Engine(10, this.value)">3D Action Game<br>
<input type=radio value="d" onClick="Engine(10, this.value)">Simulation<br>
<input type=button onClick="NextLevel()" value="Advance to next level">

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).