Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <link href ="style.css" rel ="stylesheet">
- <script src = "script.js"></script>
- </head>
- <body>
- <form id = "quiz" name = "quiz">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="1.png" name="a" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question1">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="2.png" name="b" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question2">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="3.png" name="c" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question3">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="4.png" name="d" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question4">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="5.png" name="e" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question5">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="6.png" name="f" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question6">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="7.png" name="g" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question7">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="8.png" name="h" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question8">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="9.png" name="i" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question9">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="10.png" name="j" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question10">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="11.png" name="k" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question11">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="12.png" name="l" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question12">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="13.png" name="m" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question13">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="14.png" name="n" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question14">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="15.png" name="o" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question15">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="16.png" name="p" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question16">
- <p class = "questions">Co jest pokazane na tym zdjęciu?</p>
- <img src="17.png" name="q" width="200px" height="200px"><br />
- <input id = "textbox" type = "text" name = "question17">
- <input id = "button" type = "button" value = "Skończyłem" onclick = "check();">
- <div id="timer">
- <input id="click" type="button" value="ok" onClick="countingTime()">
- <div id="time"></div>
- </div>
- </form>
- <div id = "after_submit">
- <p id = "number_correct"></p>
- <p id = "message"></p>
- <img id = "picture">
- </div>
- </body>
- </html>
- /*function check(){
- var question1 = document.quiz.question1.value;
- var question2 = document.quiz.question2.value;
- var question3 = document.quiz.question3.value;
- var question4 = document.quiz.question4.value;
- var question5 = document.quiz.question5.value;
- var question6 = document.quiz.question6.value;
- var question7 = document.quiz.question7.value;
- var question8 = document.quiz.question8.value;
- var question9 = document.quiz.question9.value;
- var question10 = document.quiz.question10.value;
- var question11 = document.quiz.question11.value;
- var question12 = document.quiz.question12.value;
- var question13 = document.quiz.question13.value;
- var question14 = document.quiz.question14.value;
- var question15 = document.quiz.question15.value;
- var question16 = document.quiz.question16.value;
- var question17 = document.quiz.question17.value;
- var correct = 0;
- if (question1 == "rezystor z oznaczeniem paskowym") {
- correct++;
- }
- if(question2 == "układ scalony") {
- correct++;
- }
- if(question3 == "tranzystor bipolarny") {
- correct++;
- }
- if(question4 == "tranzystor unipolarny") {
- correct++;
- }
- if(question5 == "dioda led") {
- correct++;
- }
- if(question6 == "dioda led smd") {
- correct++
- }
- if(question7 == "rezonator kwarcowy smd") {
- correct++
- }
- if(question8 == "dioda prostownicza") {
- correct++
- }
- if(question9 == "dioda przełączająca") {
- correct++
- }
- if(question10 == "fotodioda podczerwieni") {
- correct++
- }
- if(question11 == "rezystor smd") {
- correct++
- }
- if(question12 == "cewka z rdzeniem ferrytowym") {
- correct++
- }
- if(question13 == "cewka smd") {
- correct++
- }
- if(question14 == "kondensator elektrolityczny") {
- correct++
- }
- if(question15 == "kondensator elektrolityczny SMD") {
- correct++
- }
- if(question16 == "kondensatory smd") {
- correct++
- }
- if(question17 == "kondensator polimerowy") {
- correct++
- }
- var score;
- /*if (correct == 0) {
- score = 2;
- }
- if (correct > 0 && correct < 3) {
- score = 1;
- }
- if (correct == 3) {
- score = 0;
- }
- document.getElementById("after_submit").style.visibility = "visible";
- document.getElementById("number_correct").innerHTML = "You got " + correct + " correct.";
- }*/
- function timer () {
- var s=0;
- var m=0;
- var counting=0;
- var sc=false;
- function visilibity () {
- document.getElementById("timer").style.visibility="visible";
- }
- function count () {
- counting++;
- if(counting == 100)
- {
- counting = 0;
- s++;
- if (s==60) {
- s = 0;
- m++;
- }
- }
- refresh();
- }
- function refresh() {
- var time2;
- time2 = m + ":" + s;
- document.getElementById("time").innerHTML=time2;
- }
- function countingTime() {
- if(sc==false)
- {
- sc=true;
- visilibity();
- setInterval(count(),10);
- }
- }
- document.getElementById("click").onclick=countingTime();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement