-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
60 lines (47 loc) · 1.33 KB
/
index.html
File metadata and controls
60 lines (47 loc) · 1.33 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>賓果對獎</title>
<link type="text/css" rel="stylesheet" href="bingo.css"/>
<script type="text/javascript" src="bingo.js"></script>
<meta name="viewport" id="viewport" content="width=490, height=device-height, minimum-scale=0.1, maximum-scale=1.0, user-scalable=0"
</head>
<body>
<div id='root'>
<button class = 'okButton' onclick='addCard()'>新增卡片</button>
<button class = 'delAllButton' onclick='clearCard()'>刪除所有卡片</button>
<hr>
</div>
<div id='home'></div>
</body>
<script>
homeDiv = document.getElementById('home');
rootDiv = document.getElementById('root');
window.onbeforeunload = window.onload = function(){
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
}
newCard = false;
var cards = [];
function loadCard(){
readCardsFromCookie();
if(cards.length > 0){
createBingoBall();
createBingoCard();
bingoBallSelect('free');
}
}
function saveCard(){
saveCardToLocal();
}
function clearCard(){
var answer = confirm ('吃飽稱著 ?');
if (answer){
setData("CARDS", "");
location.reload();
}
}
loadCard();
</script>
</html>