-
Notifications
You must be signed in to change notification settings - Fork 1
/
index2.html
74 lines (68 loc) · 3.54 KB
/
index2.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Image Puzzle</title>
<link href="css/style.css" rel="stylesheet" />
<link href="css/image-puzzle.css" rel="stylesheet" />
<script src="js/image-puzzle.js"></script>
</head>
<body style="background-color: lavender;">
<div id="collage">
<audio autoplay src="music/Larghetto.mp3" preload="auto"></audio>
<h1>貨物去那兒</h1>
<hr />
<div id="playPanel" style="padding:5px;display:none;">
<h3 id="imgTitle"></h3>
<hr />
<div style="display:inline-block; margin:auto; width:95%; vertical-align:top;">
<ul id="sortable" class="sortable"></ul>
<div id="actualImageBox">
<div id="stepBox">
<div>Steps:</div>
<div id="stepCount" class="stepCount">0</div>
</div>
<div id="timeBox">
Time Taken: <span id="timerPanel"></span> secs
</div>
<img id="actualImage" />
<div>Re-arrange to create a picture like this.</div>
<p id="levelPanel">
<input type="radio" name="level" id="hard" checked="checked" value="5" onchange="imagePuzzle.startGame(images, this.value);" /> <label for="hard">Hard</label>
</p>
<div>
<button id="btnRule" type="button" class="btn" onclick="location.href='../../6_難易度選擇.html'" style="background-color: blue; color: ivory;border-radius: 5px;">返回</button>
<button id="newPhoto" type="button" class="btn" onclick="restart();" style="color: beige; border-radius: 5px;background-color: grey">Renew Photo</button>
<button id="btnReplay" type="button" class="btn" onclick="location.href='../../3_choose.html'" style="background-color: goldenrod; color: ivory;border-radius: 5px;">回選角</button>
</div>
</div>
</div>
</div>
<div id="gameOver" style="display:none;">
<div style="background-color:#B0FBFE; padding: 5px 10px 20px 10px; text-align: center; ">
<h2 style="text-align:center">Game Over!!</h2>
Congratulations!! <br /> You have completed this picture.
<br /> Steps: <span id="stepCount" class="stepCount">0</span> steps.
<br /> Time Taken: <span class="timeCount">0</span> seconds<br />
<div>
<!-- <button type="button" onclick="window.location.reload(true);">Play Again</button> -->
<input type="button" value="完成" onclick="location.href='9_恭喜通關.html'">
</div>
</div>
</div>
<script>
var images = [{
src: 'images/三井倉庫.jpg',
title: '三井倉庫'
}];
window.onload = function() {
var gridSize = document.querySelector('#levelPanel input[type="radio"]:checked').getAttribute('value');
imagePuzzle.startGame(images, gridSize);
};
function restart() {
var gridSize = document.querySelector('#levelPanel input[type="radio"]:checked').getAttribute('value');
imagePuzzle.startGame(images, gridSize);
}
</script>
</div>
</body>
</html>