-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
321 lines (202 loc) · 10.5 KB
/
index.html
File metadata and controls
321 lines (202 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css"/>
<title>Quiz</title>
<script>
var points = 0;
function resultt(){
document.getElementById("result").style.display = "block";
// document.getElementById("ocena").innerHTML = points;
if(points <= 2)
{
document.getElementById("ocena").innerHTML = 1;
}
else if(points > 2 && points < 4)
{
document.getElementById("ocena").innerHTML = 2;
}
else if(points > 3 && points < 5)
{
document.getElementById("ocena").innerHTML = 3;
}
else if(points > 4 && points < 6)
{
document.getElementById("ocena").innerHTML = 4;
}
else if(points > 5 && points < 7)
{
document.getElementById("ocena").innerHTML = 5;
}
else if(points > 6 && points < 8)
{
document.getElementById("ocena").innerHTML = 6;
}
}
function exit(){
document.getElementById("result").style.display = "none";
document.documentElement.scrollTop = 0;
location.reload();
}
function check(){
let btn = document.getElementById('submit1');
let input = document.getElementById('input');
let answers = ['WAN, MAN, LAN, WLAN, PAN', 'WAN, MAN, LAN, PAN', 'WAN MAN LAN PAN'];
let answer;
for (let i = 0; i < answers.length; i++) {
// Keep in mind the strict comparator is being used here in the conditional "==="
// capitolization will be key to returning true value as well as white space trimming in the input value
if (input.value === answers[i]) {
// Now run code for correct answer and iterate a point
//console.log(answer + ' Correct!')
points++;
document.getElementById("submit1").disabled = true;
}else
{
document.getElementById("submit1").disabled = true;
}
}
}
function check2(){
let btn = document.getElementById('submit2');
let input = document.getElementById('input5');
let answers = ['IPv6'];
let answer;
for (let i = 0; i < answers.length; i++) {
// Keep in mind the strict comparator is being used here in the conditional "==="
// capitolization will be key to returning true value as well as white space trimming in the input value
if (input.value === answers[i]) {
// Now run code for correct answer and iterate a point
//console.log(answer + ' Correct!')
points++;
document.getElementById("submit2").disabled = true;
}else
{
document.getElementById("submit2").disabled = true;
}
}
}
function check3(){
let btn = document.getElementById('submit3');
let input = document.getElementById('input2');
let answers = ['Warstwa internetu','warstwa internetu','Warstwa Internetu','WARSTWA INTERNETU'];
let answer;
for (let i = 0; i < answers.length; i++) {
// Keep in mind the strict comparator is being used here in the conditional "==="
// capitolization will be key to returning true value as well as white space trimming in the input value
if (input.value === answers[i]) {
// Now run code for correct answer and iterate a point
//console.log(answer + ' Correct!')
points++;
document.getElementById("submit3").disabled = true;
}else
{
document.getElementById("submit3").disabled = true;
}
}
}
function check4(){
let btn = document.getElementById('submit4');
let input = document.getElementById('input3');
let answers = ['tcp,udp', 'TCP,UDP','tcp, udp','TCP,UDP', 'TCP UDP', 'tcp udp'];
let answer;
for (let i = 0; i < answers.length; i++) {
// Keep in mind the strict comparator is being used here in the conditional "==="
// capitolization will be key to returning true value as well as white space trimming in the input value
if (input.value === answers[i]) {
// Now run code for correct answer and iterate a point
//console.log(answer + ' Correct!')
points++;
document.getElementById("submit4").disabled = true;
}else
{
document.getElementById("submit4").disabled = true;
}
}
}
function check_button(){
if(document.getElementById("true").clicked = true){
points++
document.getElementById("true").disabled = true;
document.getElementById("false").disabled = true;
}
}
function check_button_false(){
if(document.getElementById("false").clicked = true){
document.getElementById("true").disabled = true;
document.getElementById("false").disabled = true;
}
}
function check_button2(){
if(document.getElementById("truee").clicked = true){
points++
document.getElementById("truee").disabled = true;
document.getElementById("falsee").disabled = true;
}
}
function check_button_false2(){
if(document.getElementById("falsee").clicked = true){
document.getElementById("truee").disabled = true;
document.getElementById("falsee").disabled = true;
}
}
function check_button3(){
if(document.getElementById("trueee").clicked = true){
points++
document.getElementById("trueee").disabled = true;
document.getElementById("falseee").disabled = true;
}
}
function check_button_false3(){
if(document.getElementById("falseee").clicked = true){
document.getElementById("trueee").disabled = true;
document.getElementById("falseee").disabled = true;
}
}
</script>
</head>
<body>
<h1 id="title">Quiz Z WIEDZY O SIECI</h1>
<h1 id="pytanie1">Wypisz typy sieci od najbardziej rozległej do najmniej rozległej <br> (typy są 4, posługuj się skrutami)</h1>
<input type="text" id="input" size="50"/>
<input type="submit" id="submit1"onclick="check()">
<h1 id="pytanie2">fe8d::a08c:9255:8dd7 -> Podany adres IP należy do typu: IPv4 czy IPv6?</h1>
<input type="text" id="input5" size="50"/>
<input type="submit" id="submit2" onclick="check2()">
<h1 id="pytanie3">Jaka warstwa w modelu TCP/IP odpowiada za dostarczanie informacji do użądzenia docelowego?</h1>
<input type="text" id="input2" size="50"/>
<input type="submit" id="submit3" onclick="check3()">
<h1 id="pytanie4">Podaj 2 protokoły występujace w warstwie transportu <br> (używaj skrutów)</h1>
<input type="text" id="input3" size="50"/>
<input type="submit" id="submit4" onclick="check4()">
<h1 id="pytanie5">Jaki protokół wykożystany będzie podczas streamingu gry?</h1>
<button id="true" onclick="check_button()">UDP</button>
<button id="false" onclick="check_button_false()">TCP</button>
<h1 id="pytanie6">Rozwinięcie skrutu DNS to</h1>
<button id="truee" onclick="check_button2()">Domain Name System</button>
<button id="falsee"onclick="check_button_false2()">Distant Network Service</button>
<h1 id="pytanie7">W jakiej topologii sieci wszystkie użądzienia są podpięte do jedngo kable?</h1>
<button id="trueee" onclick="check_button3()">Topologia magistrali</button>
<button id="falseee"onclick="check_button_false3()">Topologia gwiazfy</button>
<button id="check" onclick="resultt()" href="result">SPRAWDŹ</button><br><br>
<div id="result">
<span id="ocena"></span>
<button id="SPRÓBUJ_PONOWNIE" onclick="exit()">SPRÓBUJ PONOWNIE</button>
</div>
<h1>. </h1><br>
<h1>. </h1><br>
<h1>.</h1><br>
<h1>. </h1><br>
<h1>. </h1><br>
<h1>. </h1><br>
<h1>. </h1><br>
<h1>.</h1><br>
<h1>. </h1><br>
<h1>. </h1><br>
<h1>. </h1><br>
<h1>. </h1><br>
<h1>.</h1><br>
<h1>. </h1><br>
<h1>. </h1><br>
</body>
</html>