Rainrix2001

CS102

Sep 22nd, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 17.02 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Mini IQ Test</title>
  5.     <link rel="stylesheet" type="text/css" href="style.css">
  6. </head>
  7. <body>
  8.     <div id="frame001">
  9.         <div id="text001">
  10.             <h2>Mini IQ Test</h2>
  11.             Question: <text id="number001">0</text><br>
  12.             Score: <text id="score001">0</text>
  13.         <hr>
  14.                 <div id="message001">Click Begin to start</div><br>
  15.             </div>
  16.         <div id="text002">
  17.             <div id="question001"></div>
  18.             <div id="option001"></div>
  19.             <div id="option002"></div>
  20.             <div id="option003"></div>
  21.             <div id="option004"></div>
  22.             <div id="answer001"></div>
  23.             <div id="text001">
  24.                 <div id="disappear001"><button class="buttons001" onclick="begin001()">Begin</button></div>
  25.             </div>
  26.             <div id="next001"></div>
  27.         </div>
  28.         </div>
  29.    
  30.     <script>
  31.         var q = ["1. Average age of three brothers is 15. <br> Sum of their ages will be <br><br>",
  32.          "2. Choose the best analogy. <br><br> flower: fragrance<br><br>",
  33.          "3. What is next in logical series; <br><br> 1, 4, 9, 16, 25, ?<br><br>",
  34.          "4. 20% of 80 is <br><br>",
  35.          "5. He is your brother and you are my grand-daughter. what is he to me <br><br>",
  36.          "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>",
  37.          "7. A baby was born late night. On Sunday, he is 10 days old. when he was born? <br><br>",
  38.          "8. EGGHFT are the sons and UWONMJ daughters of 742967. what is the son and daughter name of 9? <br><br>",
  39.          "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>",
  40.          "10. Mr. Mattis got first position, his sister second and no one got third position. How many students passed the examination? <br><br>"];
  41.  
  42.         var a1 = ["<button class=buttons002 onclick=q1c()>exact 45</button>",
  43.                   "<button class=buttons002 onclick=q2c()>food: aroma</button>",
  44.                   "<button class=buttons002 onclick=q3c()>36</button>",
  45.                   "<button class=buttons002 onclick=q4i()>20</button>",
  46.                   "<button class=buttons002 onclick=q5i()>grand-daughter</button>",
  47.                   "<button class=buttons002 onclick=q6i()>white</button>",
  48.                   "<button class=buttons002 onclick=q7i()>Tuesday</button>",
  49.                   "<button class=buttons002 onclick=q8i()>N son, H daughter</button>",
  50.                   "<button class=buttons002 onclick=q9i()>6</button>",
  51.                   "<button class=buttons002 onclick=q10i()>4</button>"];
  52.  
  53.         var a2 = ["<button class=buttons002 onclick=q1i()>less than 45</button>",
  54.                   "<button class=buttons002 onclick=q2i()>aroma: food</button>",
  55.                   "<button class=buttons002 onclick=q3i()>30</button>",
  56.                   "<button class=buttons002 onclick=q4c()>16</button>",
  57.                   "<button class=buttons002 onclick=q5c()>grand-son</button>",
  58.                   "<button class=buttons002 onclick=q6c()>green</button>",
  59.                   "<button class=buttons002 onclick=q7i()>Wednesday</button>",
  60.                   "<button class=buttons002 onclick=q8i()>F son, M daughter</button>",
  61.                   "<button class=buttons002 onclick=q9i()>5</button>",
  62.                   "<button class=buttons002 onclick=q10i()>1</button>"];
  63.  
  64.         var a3 = ["<button class=buttons002 onclick=q1i()>greater than 45</button>",
  65.                   "<button class=buttons002 onclick=q2i()>Dog: smell</button>",
  66.                   "<button class=buttons002 onclick=q3i()>42</button>",
  67.                   "<button class=buttons002 onclick=q4i()>12</button>",
  68.                   "<button class=buttons002 onclick=q5i()>son</button>",
  69.                   "<button class=buttons002 onclick=q6i()>blue</button>",
  70.                   "<button class=buttons002 onclick=q7c()>Friday</button>",
  71.                   "<button class=buttons002 onclick=q8c()>H son, N daughter</button>",
  72.                   "<button class=buttons002 onclick=q9i()>4</button>",
  73.                   "<button class=buttons002 onclick=q10i()>3</button>"];
  74.  
  75.         var a4 = ["<button class=buttons002 onclick=q1i()>near to 45</button>",
  76.                   "<button class=buttons002 onclick=q2i()>water: taste</button>",
  77.                   "<button class=buttons002 onclick=q3i()>40</button>",
  78.                   "<button class=buttons002 onclick=q4i()>15</button>",
  79.                   "<button class=buttons002 onclick=q5i()>daughter</button>",
  80.                   "<button class=buttons002 onclick=q6i()>red</button>",
  81.                   "<button class=buttons002 onclick=q7i()>Thursday</button>",
  82.                   "<button class=buttons002 onclick=q8i()>all sons, all daughters</button>",
  83.                   "<button class=buttons002 onclick=q9c()>5.5</button>",
  84.                   "<button class=buttons002 onclick=q10c()>2</button>"];
  85.  
  86.         var c = ["Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct", "Correct"];
  87.         var i = ["Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect", "Incorrect"];
  88.  
  89.         var n = 0;
  90.         n++;
  91.         var s = 0;
  92.         s++;
  93.  
  94.         function begin001() {
  95.             disappear001.innerHTML = "";
  96.             message001.innerHTML = "";
  97.             question001.innerHTML = q[0];
  98.             option001.innerHTML = a1[0];
  99.             option002.innerHTML = a2[0];
  100.             option003.innerHTML = a3[0];
  101.             option004.innerHTML = a4[0];
  102.             number001.innerHTML = n++;
  103.         }
  104.  
  105.         function q1c() {
  106.             answer001.innerHTML = "<div id=green001>" + c[0] + "</div>";
  107.             option001.innerHTML = "";
  108.             option002.innerHTML = "";
  109.             option003.innerHTML = "";
  110.             option004.innerHTML = "";
  111.             next001.innerHTML = "<button class=buttons001 onclick=new002()>Next</button>";
  112.             score001.innerHTML = s++;
  113.         }
  114.  
  115.         function q1i() {
  116.             answer001.innerHTML = "<div id=red001>" + i[0] + "</div>";
  117.             option001.innerHTML = "";
  118.             option002.innerHTML = "";
  119.             option003.innerHTML = "";
  120.             option004.innerHTML = "";
  121.             next001.innerHTML = "<button class=buttons001 onclick=new002()>Next</button>";
  122.         }
  123.  
  124.         function new002() {
  125.             question001.innerHTML = q[1];
  126.             option001.innerHTML = a1[1];
  127.             option002.innerHTML = a2[1];
  128.             option003.innerHTML = a3[1];
  129.             option004.innerHTML = a4[1];
  130.             next001.innerHTML = "";
  131.             answer001.innerHTML = "";
  132.             number001.innerHTML = n++;
  133.         }
  134.  
  135.         function q2c() {
  136.             answer001.innerHTML = "<div id=green001>" + c[1] + "</div>";
  137.             option001.innerHTML = "";
  138.             option002.innerHTML = "";
  139.             option003.innerHTML = "";
  140.             option004.innerHTML = "";
  141.             next001.innerHTML = "<button class=buttons001 onclick=new003()>Next</button>";
  142.             score001.innerHTML = s++;
  143.         }
  144.  
  145.         function q2i() {
  146.             answer001.innerHTML = "<div id=red001>" + i[1] + "</div>";
  147.             option001.innerHTML = "";
  148.             option002.innerHTML = "";
  149.             option003.innerHTML = "";
  150.             option004.innerHTML = "";
  151.             next001.innerHTML = "<button class=buttons001 onclick=new003()>Next</button>";
  152.         }
  153.  
  154.         function new003() {
  155.             question001.innerHTML = q[2];
  156.             option001.innerHTML = a1[2];
  157.             option002.innerHTML = a2[2];
  158.             option003.innerHTML = a3[2];
  159.             option004.innerHTML = a4[2];
  160.             next001.innerHTML = "";
  161.             answer001.innerHTML = "";
  162.             number001.innerHTML = n++;
  163.         }
  164.  
  165.         function q3c() {
  166.             answer001.innerHTML = "<div id=green001>" + c[2] + "</div>";
  167.             option001.innerHTML = "";
  168.             option002.innerHTML = "";
  169.             option003.innerHTML = "";
  170.             option004.innerHTML = "";
  171.             next001.innerHTML = "<button class=buttons001 onclick=new004()>Next</button>";
  172.             score001.innerHTML = s++;
  173.         }
  174.  
  175.         function q3i() {
  176.             answer001.innerHTML = "<div id=red001>" + i[2] + "</div>";
  177.             option001.innerHTML = "";
  178.             option002.innerHTML = "";
  179.             option003.innerHTML = "";
  180.             option004.innerHTML = "";
  181.             next001.innerHTML = "<button class=buttons001 onclick=new004()>Next</button>";
  182.         }
  183.  
  184.         function new004() {
  185.             question001.innerHTML = q[3];
  186.             option001.innerHTML = a1[3];
  187.             option002.innerHTML = a2[3];
  188.             option003.innerHTML = a3[3];
  189.             option004.innerHTML = a4[3];
  190.             next001.innerHTML = "";
  191.             answer001.innerHTML = "";
  192.             number001.innerHTML = n++;
  193.         }
  194.  
  195.         function q4c() {
  196.             answer001.innerHTML = "<div id=green001>" + c[3] + "</div>";
  197.             option001.innerHTML = "";
  198.             option002.innerHTML = "";
  199.             option003.innerHTML = "";
  200.             option004.innerHTML = "";
  201.             next001.innerHTML = "<button class=buttons001 onclick=new005()>Next</button>";
  202.             score001.innerHTML = s++;
  203.         }
  204.  
  205.         function q4i() {
  206.             answer001.innerHTML = "<div id=red001>" + i[3] + "</div>";
  207.             option001.innerHTML = "";
  208.             option002.innerHTML = "";
  209.             option003.innerHTML = "";
  210.             option004.innerHTML = "";
  211.             next001.innerHTML = "<button class=buttons001 onclick=new005()>Next</button>";
  212.         }
  213.  
  214.         function new005() {
  215.             question001.innerHTML = q[4];
  216.             option001.innerHTML = a1[4];
  217.             option002.innerHTML = a2[4];
  218.             option003.innerHTML = a3[4];
  219.             option004.innerHTML = a4[4];
  220.             next001.innerHTML = "";
  221.             answer001.innerHTML = "";
  222.             number001.innerHTML = n++;
  223.         }
  224.  
  225.         function q5c() {
  226.             answer001.innerHTML = "<div id=green001>" + c[4] + "</div>";
  227.             option001.innerHTML = "";
  228.             option002.innerHTML = "";
  229.             option003.innerHTML = "";
  230.             option004.innerHTML = "";
  231.             next001.innerHTML = "<button class=buttons001 onclick=new006()>Next</button>";
  232.             score001.innerHTML = s++;
  233.         }
  234.  
  235.         function q5i() {
  236.             answer001.innerHTML = "<div id=red001>" + i[4] + "</div>";
  237.             option001.innerHTML = "";
  238.             option002.innerHTML = "";
  239.             option003.innerHTML = "";
  240.             option004.innerHTML = "";
  241.             next001.innerHTML = "<button class=buttons001 onclick=new006()>Next</button>";
  242.         }
  243.  
  244.         function new006() {
  245.             question001.innerHTML = q[5];
  246.             option001.innerHTML = a1[5];
  247.             option002.innerHTML = a2[5];
  248.             option003.innerHTML = a3[5];
  249.             option004.innerHTML = a4[5];
  250.             next001.innerHTML = "";
  251.             answer001.innerHTML = "";
  252.             number001.innerHTML = n++;
  253.         }
  254.  
  255.         function q6c() {
  256.             answer001.innerHTML = "<div id=green001>" + c[5] + "</div>";
  257.             option001.innerHTML = "";
  258.             option002.innerHTML = "";
  259.             option003.innerHTML = "";
  260.             option004.innerHTML = "";
  261.             next001.innerHTML = "<button class=buttons001 onclick=new007()>Next</button>";
  262.             score001.innerHTML = s++;
  263.         }
  264.  
  265.         function q6i() {
  266.             answer001.innerHTML = "<div id=red001>" + i[5] + "</div>";
  267.             option001.innerHTML = "";
  268.             option002.innerHTML = "";
  269.             option003.innerHTML = "";
  270.             option004.innerHTML = "";
  271.             next001.innerHTML = "<button class=buttons001 onclick=new007()>Next</button>";
  272.         }
  273.  
  274.         function new007() {
  275.             question001.innerHTML = q[6];
  276.             option001.innerHTML = a1[6];
  277.             option002.innerHTML = a2[6];
  278.             option003.innerHTML = a3[6];
  279.             option004.innerHTML = a4[6];
  280.             next001.innerHTML = "";
  281.             answer001.innerHTML = "";
  282.             number001.innerHTML = n++;
  283.         }
  284.  
  285.         function q7c() {
  286.             answer001.innerHTML = "<div id=green001>" + c[6] + "</div>";
  287.             option001.innerHTML = "";
  288.             option002.innerHTML = "";
  289.             option003.innerHTML = "";
  290.             option004.innerHTML = "";
  291.             next001.innerHTML = "<button class=buttons001 onclick=new008()>Next</button>";
  292.             score001.innerHTML = s++;
  293.         }
  294.  
  295.         function q7i() {
  296.             answer001.innerHTML = "<div id=red001>" + i[6] + "</div>";
  297.             option001.innerHTML = "";
  298.             option002.innerHTML = "";
  299.             option003.innerHTML = "";
  300.             option004.innerHTML = "";
  301.             next001.innerHTML = "<button class=buttons001 onclick=new008()>Next</button>";
  302.         }
  303.  
  304.         function new008() {
  305.             question001.innerHTML = q[7];
  306.             option001.innerHTML = a1[7];
  307.             option002.innerHTML = a2[7];
  308.             option003.innerHTML = a3[7];
  309.             option004.innerHTML = a4[7];
  310.             next001.innerHTML = "";
  311.             answer001.innerHTML = "";
  312.             number001.innerHTML = n++;
  313.         }
  314.  
  315.         function q8c() {
  316.             answer001.innerHTML = "<div id=green001>" + c[7] + "</div>";
  317.             option001.innerHTML = "";
  318.             option002.innerHTML = "";
  319.             option003.innerHTML = "";
  320.             option004.innerHTML = "";
  321.             next001.innerHTML = "<button class=buttons001 onclick=new009()>Next</button>";
  322.             score001.innerHTML = s++;
  323.         }
  324.  
  325.         function q8i() {
  326.             answer001.innerHTML = "<div id=red001>" + i[7] + "</div>";
  327.             option001.innerHTML = "";
  328.             option002.innerHTML = "";
  329.             option003.innerHTML = "";
  330.             option004.innerHTML = "";
  331.             next001.innerHTML = "<button class=buttons001 onclick=new009()>Next</button>";
  332.         }
  333.  
  334.         function new009() {
  335.             question001.innerHTML = q[8];
  336.             option001.innerHTML = a1[8];
  337.             option002.innerHTML = a2[8];
  338.             option003.innerHTML = a3[8];
  339.             option004.innerHTML = a4[8];
  340.             next001.innerHTML = "";
  341.             answer001.innerHTML = "";
  342.             number001.innerHTML = n++;
  343.         }
  344.  
  345.         function q9c() {
  346.             answer001.innerHTML = "<div id=green001>" + c[8] + "</div>";
  347.             option001.innerHTML = "";
  348.             option002.innerHTML = "";
  349.             option003.innerHTML = "";
  350.             option004.innerHTML = "";
  351.             next001.innerHTML = "<button class=buttons001 onclick=new010()>Next</button>";
  352.             score001.innerHTML = s++;
  353.         }
  354.  
  355.         function q9i() {
  356.             answer001.innerHTML = "<div id=red001>" + i[8] + "</div>";
  357.             option001.innerHTML = "";
  358.             option002.innerHTML = "";
  359.             option003.innerHTML = "";
  360.             option004.innerHTML = "";
  361.             next001.innerHTML = "<button class=buttons001 onclick=new010()>Next</button>";
  362.         }
  363.  
  364.         function new010() {
  365.             question001.innerHTML = q[9];
  366.             option001.innerHTML = a1[9];
  367.             option002.innerHTML = a2[9];
  368.             option003.innerHTML = a3[9];
  369.             option004.innerHTML = a4[9];
  370.             next001.innerHTML = "";
  371.             answer001.innerHTML = "";
  372.             number001.innerHTML = n++;
  373.         }
  374.  
  375.         function q10c() {
  376.             answer001.innerHTML = "<div id=green001>" + c[9] + "</div>";
  377.             option001.innerHTML = "";
  378.             option002.innerHTML = "";
  379.             option003.innerHTML = "";
  380.             option004.innerHTML = "";
  381.             next001.innerHTML = "<button class=buttons001 onclick=end001()>End of Quiz</button>";
  382.             score001.innerHTML = s++;
  383.         }
  384.  
  385.         function q10i() {
  386.             answer001.innerHTML = "<div id=red001>" + i[9] + "</div>";
  387.             option001.innerHTML = "";
  388.             option002.innerHTML = "";
  389.             option003.innerHTML = "";
  390.             option004.innerHTML = "";
  391.             next001.innerHTML = "<button class=buttons001 onclick=end001()>Finish</button>";
  392.         }
  393.  
  394.         function end001() {
  395.             message001.innerHTML = "End of Quiz.";
  396.             question001.innerHTML = "";
  397.             option001.innerHTML = "";
  398.             option002.innerHTML = "";
  399.             option003.innerHTML = "";
  400.             option004.innerHTML = "";
  401.             next001.innerHTML = "<div id=text001>" + "<button class=buttons001 onclick=repeat001()>Repeat</button>" + "</div>";
  402.             answer001.innerHTML = "";
  403.         }
  404.  
  405.         function repeat001() {
  406.             location.reload();
  407.         }
  408.     </script>
  409. </body>
  410. </html>
Advertisement
Add Comment
Please, Sign In to add comment