forked from Xenoveritas/js-timer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo-debug.html
More file actions
23 lines (22 loc) · 746 Bytes
/
demo-debug.html
File metadata and controls
23 lines (22 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Demo</title>
<script type="application/javascript" src="clock.js"></script>
<script type="application/javascript" src="clock-debug.js"></script>
<script type="application/javascript">
window.addEventListener('load', function() {
var e = document.createElement('h1'), clock = new DebugClock("Demo");
document.body.appendChild(e);
clock.ontick = function(now) {
e.innerHTML = now.getHours() + ':' + Clock.zeropad(now.getMinutes()) + ':' + Clock.zeropad(now.getSeconds());
};
clock.start();
}, false);
</script>
</head>
<body>
<noscript>JavaScript demos are pretty boring if you've disabled JavaScript.</noscript>
</body>
</html>