-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
67 lines (66 loc) · 2.41 KB
/
index.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 lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>微笙走迷宫</title>
<link href="css/style.css" rel="stylesheet">
<link rel="shortcut icon" href="images/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/style_1.css">
<script src="js/jquery.js"></script>
<script src="js/jquery.hotkey.js"></script>
</head>
<a href="activity.html"><div id="circle"></div><p id="time" style="font-size: 25px;bottom: 50px;color: black;" >挑战版</p></a>
<body>
<div class="container">
<h1 class="title">微笙走迷宫</h1>
<div class="centerd">
<p>规则:从左上角出发,终点为右下角红旗处。</p>
<div id="mg" class="mg centerd"></div>
<br />
<p>提示:您可以使用键盘上的上丶下丶左丶右方向键控制迷宫中图标的移动。</p>
<strong>设置:</strong>
<p><input type="checkbox" onclick="mark(1, this);" id="mark1" /> <label for="mark1">将走过的格子用红色标出</label></p>
<form class="form-inline">
<div class="form-group">
宽:<input type="text" class="form-control" id="mg_width" value="20" size="4" maxlength="2" onkeypress="return isNumber(event)" />
</div>
<div class="form-group">
高:<input type="text" class="form-control" id="mg_height" value="20" size="4" maxlength="2" onkeypress="return isNumber(event)" />
</div>
<button type="button" class="btn btn-default" onclick="new_mg();">生成新迷宫</button>
</form>
</div>
</div>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-select.js"></script>
<script src="js/function.js"></script>
<script src="js/script.js"></script>
<script>
function new_mg() {
var w = parseInt(document.getElementById("mg_width").value) || 20,
h = parseInt(document.getElementById("mg_height").value) || 20;
mg.set({width: w, height: h}).create().show();
document.getElementById("mg_width").value = w;
document.getElementById("mg_height").value = h;
// count();
}
// function count() {
// $.get("stat/count.py", {
// r: Math.random()
// }, function (r) {
// r = r.replace(/[\r\n\s]/g, "");
// if (r.match(/^\d+$/))
// $("#count").html(r);
// });
// }
function mark(h, ob) {
mg.me.setMark(h, ob.checked);
}
var mg = new MG("mg");
new_mg();
</script>
</body>
</html>