Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.97 KB | None | 0 0
  1. <html>
  2. <head>
  3. <link href ="style.css" rel ="stylesheet">
  4. <script src = "script.js"></script>
  5.  
  6. </head>
  7.  
  8. <body>
  9. <form id = "quiz" name = "quiz">
  10. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  11. <img src="1.png" name="a" width="200px" height="200px"><br />
  12. <input id = "textbox" type = "text" name = "question1">
  13. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  14. <img src="2.png" name="b" width="200px" height="200px"><br />
  15. <input id = "textbox" type = "text" name = "question2">
  16. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  17. <img src="3.png" name="c" width="200px" height="200px"><br />
  18. <input id = "textbox" type = "text" name = "question3">
  19. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  20. <img src="4.png" name="d" width="200px" height="200px"><br />
  21. <input id = "textbox" type = "text" name = "question4">
  22. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  23. <img src="5.png" name="e" width="200px" height="200px"><br />
  24. <input id = "textbox" type = "text" name = "question5">
  25. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  26. <img src="6.png" name="f" width="200px" height="200px"><br />
  27. <input id = "textbox" type = "text" name = "question6">
  28. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  29. <img src="7.png" name="g" width="200px" height="200px"><br />
  30. <input id = "textbox" type = "text" name = "question7">
  31. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  32. <img src="8.png" name="h" width="200px" height="200px"><br />
  33. <input id = "textbox" type = "text" name = "question8">
  34. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  35. <img src="9.png" name="i" width="200px" height="200px"><br />
  36. <input id = "textbox" type = "text" name = "question9">
  37. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  38. <img src="10.png" name="j" width="200px" height="200px"><br />
  39. <input id = "textbox" type = "text" name = "question10">
  40. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  41. <img src="11.png" name="k" width="200px" height="200px"><br />
  42. <input id = "textbox" type = "text" name = "question11">
  43. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  44. <img src="12.png" name="l" width="200px" height="200px"><br />
  45. <input id = "textbox" type = "text" name = "question12">
  46. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  47. <img src="13.png" name="m" width="200px" height="200px"><br />
  48. <input id = "textbox" type = "text" name = "question13">
  49. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  50. <img src="14.png" name="n" width="200px" height="200px"><br />
  51. <input id = "textbox" type = "text" name = "question14">
  52. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  53. <img src="15.png" name="o" width="200px" height="200px"><br />
  54. <input id = "textbox" type = "text" name = "question15">
  55. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  56. <img src="16.png" name="p" width="200px" height="200px"><br />
  57. <input id = "textbox" type = "text" name = "question16">
  58. <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
  59. <img src="17.png" name="q" width="200px" height="200px"><br />
  60. <input id = "textbox" type = "text" name = "question17">
  61. <input id = "button" type = "button" value = "Skończyłem" onclick = "check();">
  62. <div id="timer">
  63. <input id="click" type="button" value="ok" onClick="countingTime()">
  64. <div id="time"></div>
  65. </div>
  66. </form>
  67.  
  68. <div id = "after_submit">
  69. <p id = "number_correct"></p>
  70. <p id = "message"></p>
  71. <img id = "picture">
  72. </div>
  73. </body>
  74. </html>
  75.  
  76.  
  77. /*function check(){
  78.  
  79. var question1 = document.quiz.question1.value;
  80. var question2 = document.quiz.question2.value;
  81. var question3 = document.quiz.question3.value;
  82. var question4 = document.quiz.question4.value;
  83. var question5 = document.quiz.question5.value;
  84. var question6 = document.quiz.question6.value;
  85. var question7 = document.quiz.question7.value;
  86. var question8 = document.quiz.question8.value;
  87. var question9 = document.quiz.question9.value;
  88. var question10 = document.quiz.question10.value;
  89. var question11 = document.quiz.question11.value;
  90. var question12 = document.quiz.question12.value;
  91. var question13 = document.quiz.question13.value;
  92. var question14 = document.quiz.question14.value;
  93. var question15 = document.quiz.question15.value;
  94. var question16 = document.quiz.question16.value;
  95. var question17 = document.quiz.question17.value;
  96.  
  97.  
  98.  
  99. var correct = 0;
  100.  
  101.  
  102. if (question1 == "rezystor z oznaczeniem paskowym") {
  103. correct++;
  104. }
  105. if(question2 == "układ scalony") {
  106. correct++;
  107. }
  108. if(question3 == "tranzystor bipolarny") {
  109. correct++;
  110. }
  111. if(question4 == "tranzystor unipolarny") {
  112. correct++;
  113. }
  114. if(question5 == "dioda led") {
  115. correct++;
  116. }
  117. if(question6 == "dioda led smd") {
  118. correct++
  119. }
  120. if(question7 == "rezonator kwarcowy smd") {
  121. correct++
  122. }
  123. if(question8 == "dioda prostownicza") {
  124. correct++
  125. }
  126. if(question9 == "dioda przełączająca") {
  127. correct++
  128. }
  129. if(question10 == "fotodioda podczerwieni") {
  130. correct++
  131. }
  132. if(question11 == "rezystor smd") {
  133. correct++
  134. }
  135. if(question12 == "cewka z rdzeniem ferrytowym") {
  136. correct++
  137. }
  138. if(question13 == "cewka smd") {
  139. correct++
  140. }
  141. if(question14 == "kondensator elektrolityczny") {
  142. correct++
  143. }
  144. if(question15 == "kondensator elektrolityczny SMD") {
  145. correct++
  146. }
  147. if(question16 == "kondensatory smd") {
  148. correct++
  149. }
  150. if(question17 == "kondensator polimerowy") {
  151. correct++
  152. }
  153.  
  154. var score;
  155.  
  156. /*if (correct == 0) {
  157. score = 2;
  158. }
  159.  
  160. if (correct > 0 && correct < 3) {
  161. score = 1;
  162. }
  163.  
  164. if (correct == 3) {
  165. score = 0;
  166. }
  167.  
  168.  
  169. document.getElementById("after_submit").style.visibility = "visible";
  170.  
  171. document.getElementById("number_correct").innerHTML = "You got " + correct + " correct.";
  172.  
  173. }*/
  174. function timer () {
  175. var s=0;
  176. var m=0;
  177. var counting=0;
  178. var sc=false;
  179. function visilibity () {
  180. document.getElementById("timer").style.visibility="visible";
  181. }
  182. function count () {
  183. counting++;
  184. if(counting == 100)
  185. {
  186. counting = 0;
  187. s++;
  188. if (s==60) {
  189. s = 0;
  190. m++;
  191. }
  192. }
  193. refresh();
  194. }
  195. function refresh() {
  196. var time2;
  197. time2 = m + ":" + s;
  198. document.getElementById("time").innerHTML=time2;
  199. }
  200. function countingTime() {
  201. if(sc==false)
  202. {
  203. sc=true;
  204. visilibity();
  205. setInterval(count(),10);
  206. }
  207. }
  208. document.getElementById("click").onclick=countingTime();
  209. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement