-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (38 loc) · 1.58 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
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./css/flipclock.css">
<link rel="stylesheet" href="./css/style.css">
<!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
<script src="./js/jquery.min.js"></script>
<script src="./js/flipclock.js"></script>
</head>
<body>
<div id="box">
<div id="content">
<div class="clock" id="flipclock"></div>
<h1 class="date" id='ShowDate'></h1>
</div>
</div>
<script type="text/javascript">
// mobile
if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
document.getElementById('flipclock').setAttribute("style","zoom:1.5;");
document.getElementById('ShowDate').setAttribute("style","zoom:1.5;");
}
var clock;
$(document).ready(function() {
clock = $('.clock').FlipClock({
clockFace: 'TwelveHourClock',
showSeconds: false
});
});
var month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
var week = ['Mon', 'Tues', 'wed', 'Thur', 'Fri', 'Sat', 'Sun'];
var d = new Date();
// document.getElementById('ShowDate').innerHTML = d.getFullYear() + "年" +(d.getMonth() + 1) + "月" + d.getDate() + "日" + ' 星期'+'日一二三四五六'.charAt(new Date().getDay());
document.getElementById('ShowDate').innerHTML = d.getFullYear() + "-" + month[d.getMonth()] + "-" + d.getDate() + ', ' + week[d.getDay()];
</script>
</body>
</html>