Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html" />
- <meta name="author" content="Bartosz Michalak" />
- <meta charset="utf-8" />
- <title></title>
- </head>
- <body>
- <center>
- <h1>
- 1. Jak napisać IF w JavaScript?
- </h1>
- <form name=pyt1>
- <input type=radio value=a name=odp>if (i==5)<br>
- <input type=radio value=b name=odp>if i == 5 then<br>
- <input type=radio value=c name=odp>if i=5 then<br>
- <input type=radio value=c name=odp>if i= 5<br>
- </form>
- <br>
- <h1>
- 2. Jak napisać "Hello World" w alercie?
- </h1>
- <form name=pyt2>
- <input type=radio value=a name=odp>msg Hello World<br>
- <input type=radio value=b name=odp>alert("Hello World");<br>
- <input type=radio value=c name=odp>message(Hello World)<br>
- <input type=radio value=c name=odp>popup ("Hello World")<br>
- </form>
- <br>
- <h1>
- 3. Jak poprawnie stworzyć formularz typu "radio"
- </h1>
- <form name=pyt3>
- <input type=radio value=a name=odp>< form=radio create=1 name=nazwa ><br>
- <input type=radio value=b name=odp>< radio value=a name=nazwa ><br>
- <input type=radio value=c name=odp>< input type=radio value=a name=odp ><br>
- <input type=radio value=c name=odp>< input type=rad io value=a name=odp ><br>
- </form>
- <br>
- <h1>
- 4. Jak poprawnie stworzyć funkcję?
- </h1>
- <form name=pyt4>
- <input type=radio value=a name=odp>funkcja=funkcja <br>
- <input type=radio value=b name=odp>func funkcja=<br>
- <input type=radio value=c name=odp>function funkcja() <br>
- <input type=radio value=c name=odp>function ("funkcja)";<br>
- </form>
- <br>
- <h1>
- 5. Jak powinno się rozpoczynac formularz?
- </h1>
- <form name=pyt5>
- <input type=radio value=a name=odp>< for ><br>
- <input type=radio value=b name=odp>< form name=nazwa_formularza ><br>
- <input type=radio value=c name=odp>formurlarz name=nazwa_formularza<br>
- <input type=radio value=c name=odp>< formula ><br>
- </form>
- <br>
- <h1>
- 6. Jak wyświetlić tekst w JavaScript
- </h1>
- <form name=pyt6>
- <input type=radio value=a name=odp>write.document("jakiś tekst")<br>
- <input type=radio value=b name=odp>show.text("jakiś tekst")<br>
- <input type=radio value=c name=odp>document.write=jakiś tekst<br>
- <input type=radio value=c name=odp>document.write("jakiś tekst")<br>
- </form>
- <br>
- <h1>
- 7. Jaki jest poprawny zapis pętli for?
- </h1>
- <form name=pyt7>
- <input type=radio value=a name=odp>for (i++ i = 1 i<=> 1000)<br>
- <input type=radio value=b name=odp>for (i = 1; i <= 1000; i++)<br>
- <input type=radio value=c name=odp>for = i = 1; i <= 1000; i++)<br>
- <input type=radio value=c name=odp>for (i = 1; i <= 1000; i}<br>
- </form>
- <br>
- <h1>
- 8. Pytanie 8
- </h1>
- <form name=pyt8>
- <input type=radio value=a name=odp>Dobra odpowiedź<br>
- <input type=radio value=b name=odp>Zła odpowiedź<br>
- <input type=radio value=c name=odp>Zła odpowiedź<br>
- <input type=radio value=c name=odp>Zła odpowiedź<br>
- </form>
- <br>
- <h1>
- 9. Pytanie 9
- </h1>
- <form name=pyt9>
- <input type=radio value=a name=odp>Zła odpowiedź<br>
- <input type=radio value=b name=odp>Zła odpowiedź<br>
- <input type=radio value=c name=odp>Dobra odpowiedź<br>
- <input type=radio value=c name=odp>Zła odpowiedź<br>
- </form>
- <br>
- <h1>
- 10. Pytanie 10
- </h1>
- <form name=pyt10>
- <input type=radio value=a name=odp>Dobra odpowiedź<br>
- <input type=radio value=b name=odp>Zła odpowiedź<br>
- <input type=radio value=c name=odp>Zła odpowiedź<br>
- <input type=radio value=c name=odp>Zła odpowiedź<br>
- </form>
- <br>
- <form name=regulamin>
- <input type=checkbox value=a name=reg><b>Zaakceptuj regulamin</b><br>
- </form>
- <br>
- <input onclick=wynik() type=button align=left value="Suma punktów" name=question>
- <script language=javascript>
- function wynik() {
- var punkty
- punkty = 0
- if (document.pyt1.odp[0].checked) {punkty = punkty + 1};
- if (document.pyt2.odp[1].checked) {punkty = punkty + 1};
- if (document.pyt3.odp[2].checked) {punkty = punkty + 1};
- if (document.pyt4.odp[2].checked) {punkty = punkty + 1};
- if (document.pyt5.odp[1].checked) {punkty = punkty + 1};
- if (document.pyt6.odp[3].checked) {punkty = punkty + 1};
- if (document.pyt7.odp[1].checked) {punkty = punkty + 1};
- if (document.pyt8.odp[0].checked) {punkty = punkty + 1};
- if (document.pyt9.odp[2].checked) {punkty = punkty + 1};
- if (document.pyt10.odp[0].checked) {punkty = punkty + 1};
- var regulamin
- if (document.regulamin.reg.checked == false ) alert("Nie zaakceptowałeś regulaminu!");
- else alert("Uzyskałeś " + punkty + " punktów. ");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement