Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html" />
  5. <meta name="author" content="Bartosz Michalak" />
  6. <meta charset="utf-8" />
  7.  
  8. <title></title>
  9. </head>
  10.  
  11. <body>
  12. <center>
  13. <h1>
  14. 1. Jak napisać IF w JavaScript?
  15. </h1>
  16. <form name=pyt1>
  17. <input type=radio value=a name=odp>if (i==5)<br>
  18. <input type=radio value=b name=odp>if i == 5 then<br>
  19. <input type=radio value=c name=odp>if i=5 then<br>
  20. <input type=radio value=c name=odp>if i= 5<br>
  21.  
  22. </form>
  23. <br>
  24. <h1>
  25. 2. Jak napisać "Hello World" w alercie?
  26. </h1>
  27. <form name=pyt2>
  28. <input type=radio value=a name=odp>msg Hello World<br>
  29. <input type=radio value=b name=odp>alert("Hello World");<br>
  30. <input type=radio value=c name=odp>message(Hello World)<br>
  31. <input type=radio value=c name=odp>popup ("Hello World")<br>
  32.  
  33. </form>
  34. <br>
  35. <h1>
  36. 3. Jak poprawnie stworzyć formularz typu "radio"
  37. </h1>
  38. <form name=pyt3>
  39. <input type=radio value=a name=odp>< form=radio create=1 name=nazwa ><br>
  40. <input type=radio value=b name=odp>< radio value=a name=nazwa ><br>
  41. <input type=radio value=c name=odp>< input type=radio value=a name=odp ><br>
  42. <input type=radio value=c name=odp>< input type=rad io value=a name=odp ><br>
  43.  
  44. </form>
  45. <br>
  46. <h1>
  47. 4. Jak poprawnie stworzyć funkcję?
  48. </h1>
  49. <form name=pyt4>
  50. <input type=radio value=a name=odp>funkcja=funkcja <br>
  51. <input type=radio value=b name=odp>func funkcja=<br>
  52. <input type=radio value=c name=odp>function funkcja() <br>
  53. <input type=radio value=c name=odp>function ("funkcja)";<br>
  54.  
  55. </form>
  56. <br>
  57. <h1>
  58. 5. Jak powinno się rozpoczynac formularz?
  59. </h1>
  60. <form name=pyt5>
  61. <input type=radio value=a name=odp>< for ><br>
  62. <input type=radio value=b name=odp>< form name=nazwa_formularza ><br>
  63. <input type=radio value=c name=odp>formurlarz name=nazwa_formularza<br>
  64. <input type=radio value=c name=odp>< formula ><br>
  65.  
  66. </form>
  67. <br>
  68. <h1>
  69. 6. Jak wyświetlić tekst w JavaScript
  70. </h1>
  71. <form name=pyt6>
  72. <input type=radio value=a name=odp>write.document("jakiś tekst")<br>
  73. <input type=radio value=b name=odp>show.text("jakiś tekst")<br>
  74. <input type=radio value=c name=odp>document.write=jakiś tekst<br>
  75. <input type=radio value=c name=odp>document.write("jakiś tekst")<br>
  76.  
  77. </form>
  78. <br>
  79. <h1>
  80. 7. Jaki jest poprawny zapis pętli for?
  81. </h1>
  82. <form name=pyt7>
  83. <input type=radio value=a name=odp>for (i++ i = 1 i<=> 1000)<br>
  84. <input type=radio value=b name=odp>for (i = 1; i <= 1000; i++)<br>
  85. <input type=radio value=c name=odp>for = i = 1; i <= 1000; i++)<br>
  86. <input type=radio value=c name=odp>for (i = 1; i <= 1000; i}<br>
  87.  
  88. </form>
  89. <br>
  90. <h1>
  91. 8. Pytanie 8
  92. </h1>
  93. <form name=pyt8>
  94. <input type=radio value=a name=odp>Dobra odpowiedź<br>
  95. <input type=radio value=b name=odp>Zła odpowiedź<br>
  96. <input type=radio value=c name=odp>Zła odpowiedź<br>
  97. <input type=radio value=c name=odp>Zła odpowiedź<br>
  98.  
  99. </form>
  100. <br>
  101. <h1>
  102. 9. Pytanie 9
  103. </h1>
  104. <form name=pyt9>
  105. <input type=radio value=a name=odp>Zła odpowiedź<br>
  106. <input type=radio value=b name=odp>Zła odpowiedź<br>
  107. <input type=radio value=c name=odp>Dobra odpowiedź<br>
  108. <input type=radio value=c name=odp>Zła odpowiedź<br>
  109.  
  110. </form>
  111. <br>
  112. <h1>
  113. 10. Pytanie 10
  114. </h1>
  115. <form name=pyt10>
  116. <input type=radio value=a name=odp>Dobra odpowiedź<br>
  117. <input type=radio value=b name=odp>Zła odpowiedź<br>
  118. <input type=radio value=c name=odp>Zła odpowiedź<br>
  119. <input type=radio value=c name=odp>Zła odpowiedź<br>
  120.  
  121. </form>
  122. <br>
  123. <form name=regulamin>
  124. <input type=checkbox value=a name=reg><b>Zaakceptuj regulamin</b><br>
  125.  
  126. </form>
  127.  
  128. <br>
  129.  
  130. <input onclick=wynik() type=button align=left value="Suma punktów" name=question>
  131.  
  132. <script language=javascript>
  133. function wynik() {
  134. var punkty
  135. punkty = 0
  136. if (document.pyt1.odp[0].checked) {punkty = punkty + 1};
  137. if (document.pyt2.odp[1].checked) {punkty = punkty + 1};
  138. if (document.pyt3.odp[2].checked) {punkty = punkty + 1};
  139. if (document.pyt4.odp[2].checked) {punkty = punkty + 1};
  140. if (document.pyt5.odp[1].checked) {punkty = punkty + 1};
  141. if (document.pyt6.odp[3].checked) {punkty = punkty + 1};
  142. if (document.pyt7.odp[1].checked) {punkty = punkty + 1};
  143. if (document.pyt8.odp[0].checked) {punkty = punkty + 1};
  144. if (document.pyt9.odp[2].checked) {punkty = punkty + 1};
  145. if (document.pyt10.odp[0].checked) {punkty = punkty + 1};
  146. var regulamin
  147. if (document.regulamin.reg.checked == false ) alert("Nie zaakceptowałeś regulaminu!");
  148. else alert("Uzyskałeś " + punkty + " punktów. ");
  149.  
  150. }
  151. </script>
  152.  
  153.  
  154.  
  155. </body>
  156. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement