Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Mini IQ Test</title>
- <link rel="stylesheet" type="text/css" href="style.css">
- </head>
- <body>
- <div id="frame001">
- <div id="text001">
- <h2>Mini IQ Test</h2>
- Question: <text id="number001">0</text><br>
- Score: <text id="score001">0</text>
- <hr>
- <div id="message001">Click Begin to start</div><br>
- </div>
- <div id="text002">
- <div id="question001"></div>
- <div id="option001"></div>
- <div id="option002"></div>
- <div id="option003"></div>
- <div id="option004"></div>
- <div id="answer001"></div>
- <div id="text001">
- <div id="disappear001"><button class="buttons001" onclick="begin001()">Begin</button></div>
- </div>
- <div id="next001"></div>
- </div>
- </div>
- <script>
- var q = ["1. Average age of three brothers is 15. <br> Sum of their ages will be <br><br>",
- "2. Choose the best analogy. <br><br> flower: fragrance<br><br>",
- "3. What is next in logical series; <br><br> 1, 4, 9, 16, 25, ?<br><br>",
- "4. 20% of 80 is <br><br>",
- "5. He is your brother and you are my grand-daughter. what is he to me <br><br>",
- "6. Mr. A likes red and green colour, Mr. B likes red, white and blue colour, C likes white, green and blue colour whereas D likes only green colour. which is the most liked colour. <br><br>",
- "7. A baby was born late night. On Sunday, he is 10 days old. when he was born? <br><br>",
- "8. EGGHFT are the sons and UWONMJ daughters of 742967. what is the son and daughter name of 9? <br><br>",
- "9. There is 1100 gram water in a glass. You are to drink 200 gram water in one second. How many seconds are required to drink the whole water ? <br><br>",
- "10. Mr. Mattis got first position, his sister second and no one got third position. How many students passed the examination? <br><br>"];
- var a1 = ["<button class=buttons002 onclick=q1c()>exact 45</button>",
- "<button class=buttons002 onclick=q2c()>food: aroma</button>",
- "<button class=buttons002 onclick=q3c()>36</button>",
- "<button class=buttons002 onclick=q4i()>20</button>",
- "<button class=buttons002 onclick=q5i()>grand-daughter</button>",
- "<button class=buttons002 onclick=q6i()>white</button>",
- "<button class=buttons002 onclick=q7i()>Tuesday</button>",
- "<button class=buttons002 onclick=q8i()>N son, H daughter</button>",
- "<button class=buttons002 onclick=q9i()>6</button>",
- "<button class=buttons002 onclick=q10i()>4</button>"];
- var a2 = ["<button class=buttons002 onclick=q1i()>less than 45</button>",
- "<button class=buttons002 onclick=q2i()>aroma: food</button>",
- "<button class=buttons002 onclick=q3i()>30</button>",
- "<button class=buttons002 onclick=q4c()>16</button>",
- "<button class=buttons002 onclick=q5c()>grand-son</button>",
- "<button class=buttons002 onclick=q6c()>green</button>",
- "<button class=buttons002 onclick=q7i()>Wednesday</button>",
- "<button class=buttons002 onclick=q8i()>F son, M daughter</button>",
- "<button class=buttons002 onclick=q9i()>5</button>",
- "<button class=buttons002 onclick=q10i()>1</button>"];
- var a3 = ["<button class=buttons002 onclick=q1i()>greater than 45</button>",
- "<button class=buttons002 onclick=q2i()>Dog: smell</button>",
- "<button class=buttons002 onclick=q3i()>42</button>",
- "<button class=buttons002 onclick=q4i()>12</button>",
- "<button class=buttons002 onclick=q5i()>son</button>",
- "<button class=buttons002 onclick=q6i()>blue</button>",
- "<button class=buttons002 onclick=q7c()>Friday</button>",
- "<button class=buttons002 onclick=q8c()>H son, N daughter</button>",
- "<button class=buttons002 onclick=q9i()>4</button>",
- "<button class=buttons002 onclick=q10i()>3</button>"];
- var a4 = ["<button class=buttons002 onclick=q1i()>near to 45</button>",
- "<button class=buttons002 onclick=q2i()>water: taste</button>",
- "<button class=buttons002 onclick=q3i()>40</button>",
- "<button class=buttons002 onclick=q4i()>15</button>",
- "<button class=buttons002 onclick=q5i()>daughter</button>",
- "<button class=buttons002 onclick=q6i()>red</button>",
- "<button class=buttons002 onclick=q7i()>Thursday</button>",
- "<button class=buttons002 onclick=q8i()>all sons, all daughters</button>",
- "<button class=buttons002 onclick=q9c()>5.5</button>",
- "<button class=buttons002 onclick=q10c()>2</button>"];
- var c = ["Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct"];
- var i = ["Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect"];
- var n = 0;
- n++;
- var s = 0;
- s++;
- function begin001() {
- disappear001.innerHTML = "";
- message001.innerHTML = "";
- question001.innerHTML = q[0];
- option001.innerHTML = a1[0];
- option002.innerHTML = a2[0];
- option003.innerHTML = a3[0];
- option004.innerHTML = a4[0];
- number001.innerHTML = n++;
- }
- function q1c() {
- answer001.innerHTML = "<div id=green001>" + c[0] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new002()>Next</button>";
- score001.innerHTML = s++;
- }
- function q1i() {
- answer001.innerHTML = "<div id=red001>" + i[0] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new002()>Next</button>";
- }
- function new002() {
- question001.innerHTML = q[1];
- option001.innerHTML = a1[1];
- option002.innerHTML = a2[1];
- option003.innerHTML = a3[1];
- option004.innerHTML = a4[1];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q2c() {
- answer001.innerHTML = "<div id=green001>" + c[1] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new003()>Next</button>";
- score001.innerHTML = s++;
- }
- function q2i() {
- answer001.innerHTML = "<div id=red001>" + i[1] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new003()>Next</button>";
- }
- function new003() {
- question001.innerHTML = q[2];
- option001.innerHTML = a1[2];
- option002.innerHTML = a2[2];
- option003.innerHTML = a3[2];
- option004.innerHTML = a4[2];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q3c() {
- answer001.innerHTML = "<div id=green001>" + c[2] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new004()>Next</button>";
- score001.innerHTML = s++;
- }
- function q3i() {
- answer001.innerHTML = "<div id=red001>" + i[2] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new004()>Next</button>";
- }
- function new004() {
- question001.innerHTML = q[3];
- option001.innerHTML = a1[3];
- option002.innerHTML = a2[3];
- option003.innerHTML = a3[3];
- option004.innerHTML = a4[3];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q4c() {
- answer001.innerHTML = "<div id=green001>" + c[3] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new005()>Next</button>";
- score001.innerHTML = s++;
- }
- function q4i() {
- answer001.innerHTML = "<div id=red001>" + i[3] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new005()>Next</button>";
- }
- function new005() {
- question001.innerHTML = q[4];
- option001.innerHTML = a1[4];
- option002.innerHTML = a2[4];
- option003.innerHTML = a3[4];
- option004.innerHTML = a4[4];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q5c() {
- answer001.innerHTML = "<div id=green001>" + c[4] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new006()>Next</button>";
- score001.innerHTML = s++;
- }
- function q5i() {
- answer001.innerHTML = "<div id=red001>" + i[4] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new006()>Next</button>";
- }
- function new006() {
- question001.innerHTML = q[5];
- option001.innerHTML = a1[5];
- option002.innerHTML = a2[5];
- option003.innerHTML = a3[5];
- option004.innerHTML = a4[5];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q6c() {
- answer001.innerHTML = "<div id=green001>" + c[5] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new007()>Next</button>";
- score001.innerHTML = s++;
- }
- function q6i() {
- answer001.innerHTML = "<div id=red001>" + i[5] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new007()>Next</button>";
- }
- function new007() {
- question001.innerHTML = q[6];
- option001.innerHTML = a1[6];
- option002.innerHTML = a2[6];
- option003.innerHTML = a3[6];
- option004.innerHTML = a4[6];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q7c() {
- answer001.innerHTML = "<div id=green001>" + c[6] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new008()>Next</button>";
- score001.innerHTML = s++;
- }
- function q7i() {
- answer001.innerHTML = "<div id=red001>" + i[6] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new008()>Next</button>";
- }
- function new008() {
- question001.innerHTML = q[7];
- option001.innerHTML = a1[7];
- option002.innerHTML = a2[7];
- option003.innerHTML = a3[7];
- option004.innerHTML = a4[7];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q8c() {
- answer001.innerHTML = "<div id=green001>" + c[7] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new009()>Next</button>";
- score001.innerHTML = s++;
- }
- function q8i() {
- answer001.innerHTML = "<div id=red001>" + i[7] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new009()>Next</button>";
- }
- function new009() {
- question001.innerHTML = q[8];
- option001.innerHTML = a1[8];
- option002.innerHTML = a2[8];
- option003.innerHTML = a3[8];
- option004.innerHTML = a4[8];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q9c() {
- answer001.innerHTML = "<div id=green001>" + c[8] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new010()>Next</button>";
- score001.innerHTML = s++;
- }
- function q9i() {
- answer001.innerHTML = "<div id=red001>" + i[8] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=new010()>Next</button>";
- }
- function new010() {
- question001.innerHTML = q[9];
- option001.innerHTML = a1[9];
- option002.innerHTML = a2[9];
- option003.innerHTML = a3[9];
- option004.innerHTML = a4[9];
- next001.innerHTML = "";
- answer001.innerHTML = "";
- number001.innerHTML = n++;
- }
- function q10c() {
- answer001.innerHTML = "<div id=green001>" + c[9] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=end001()>End of Quiz</button>";
- score001.innerHTML = s++;
- }
- function q10i() {
- answer001.innerHTML = "<div id=red001>" + i[9] + "</div>";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<button class=buttons001 onclick=end001()>Finish</button>";
- }
- function end001() {
- message001.innerHTML = "End of Quiz.";
- question001.innerHTML = "";
- option001.innerHTML = "";
- option002.innerHTML = "";
- option003.innerHTML = "";
- option004.innerHTML = "";
- next001.innerHTML = "<div id=text001>" + "<button class=buttons001 onclick=repeat001()>Repeat</button>" + "</div>";
- answer001.innerHTML = "";
- }
- function repeat001() {
- location.reload();
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment