-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQ1.html
83 lines (78 loc) · 3.33 KB
/
Q1.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="imagetoolbar" content="no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Title" content="QUIZ1"/>
<meta http-equiv="Author" content="윤준석"/>
<title>Q1.</title>
<link rel="stylesheet" href="./css/quiz.css">
</head>
<body>
<header>
<h1>스핑크스 퀴즈 Q1.</h1>
<nav>
<ul>
<form>
<button class="button" type="button" onclick="location.href='./Q1.html'">
<div id="digit"></div>
</button>
</form>
</ul>
</nav>
<div id="myProgress">
<div id="myBar"></div>
</div>
</header>
<br><br>
<div class="main">
<h3 class="co" style="font-size: 60px;">첫 번째 퀴즈다!!!!!!</h3>
<h3 class="co" style="font-size: 80px;">바나나가 웃으면 ?</h3>
<h3 class="co" style="font-size: 45px;">시간안에 답을 맞춰라!!!!</h3>
</div>
<div class="sub">
<form name="form">
<input type="radio" name="answer" value="v1" style="width:30px;height:30px;border:1px;">풋볼<br>
<input type="radio" name="answer" value="v2" style="width:30px;height:30px;border:1px;">중요한건 사우디의 꺾이지않는마음<br>
<input type="radio" name="answer" value="v3" style="width:30px;height:30px;border:1px;">바나나킥<br>
<input type="radio" name="answer" value="v4" style="width:30px;height:30px;border:1px;">풉킥풉킥<br>
<input type="button" class="qbutton" name="선택" value="정답 제출하기" onclick="quiz_1()">
<script type="text/javascript">
function quiz_1() {
if (form.answer[2].checked == true) window.location.href = "./Q2.html";
else parent.location.href = "./gameover.html";
}
</script>
</div>
<script>
var i = 30;
window.onload = function start() {
if (i == 30) {
i = 29;
var digit = document.getElementById("digit");
var elem = document.getElementById("myBar");
var width = 29;
var id = setInterval(frame, 1000);
function frame() {
if (width <= 0) {
clearInterval(id);
i = 400;
digit.innerHTML = "남은 시간: " + width + "초";
alert("시간이 초과 되었다!!!! 널 잡아먹겠다!!!!");
parent.location.href = "./gameover.html";
} else {
digit.innerHTML = "남은 시간: " + width + "초";
width--;
elem.style.width = width + "px";
}
}
}
}
</script>
<img id="bgimg" src="./img/sphinx.png" alt="이미지를 표현할 수 없습니다.">
<img id="cursorimg" style="position:absolute; left:0; top:0; z-index:999;" src="./img/sphinxnobg.png" alt="이미지를 표현할 수 없습니다.">
<script src="./js/cursor.js"></script>
</body>
</html>