-
Notifications
You must be signed in to change notification settings - Fork 0
/
dwanasciehard.html
67 lines (58 loc) · 1.69 KB
/
dwanasciehard.html
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
<!DOCTYPE html>
<html>
<head>
<title>Pytanie nr 12</title>
<link rel="stylesheet" type="text/css" href="stajl.css">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>Pytanie 12</h1>
<div id="some_div"></div>
<div style="clear: both;"></div>
</div>
<br /><br /><br /><br /><br /><br /><br /><br /><br />
<p>Jeżeli długość przeciwprostokątnej trójkąta prostokątnego jest równa 2√10, a jednej z jego przyprostokątnych 2, to jaka jest długość drugiej przyprostokątnej?</p><br /><br /><br /><br />
<div class="inputs">
Odpowiedź: <input type="text" name="tak" id="numb">
<button type="button" onclick="myFunction()">Dalej</button>
</div>
<script>
function myFunction() {
var x, text;
// Get the value of the input field with id="numb"
x = document.getElementById("numb").value;
// If x is Not a Number or less than one or greater than 10
if (x == 6) {
location.replace("trzynasciehard.html");
} else {
window.location.href = "zlahard.html"
}
document.getElementById("demo").innerHTML = text;
}
</script>
<script>
var timeLeft = 50;
var elem = document.getElementById('some_div');
var timerId = setInterval(countdown, 1000);
function countdown() {
if (timeLeft == -1) {
clearTimeout(timerId);
doSomething();
} else {
elem.innerHTML = timeLeft;
timeLeft--;
}
if (timeLeft == 19){
elem.style.color = 'orange';
}
if (timeLeft == 9){
elem.style.color = 'red';
}
}
function doSomething() {
window.location.href = "zlahard.html"
}
</script>
</body>
</html>