-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (40 loc) · 841 Bytes
/
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
<html>
<head>
<style type="text/css">
body {
padding: 0;
margin: 0;
}
button {
width: 40vmin;
height: 40vmin;
font-size: 11vmin;
margin: 5%;
}
iframe {
width: 1px;
height: 1px;
top: -10px;
position: absolute;
}
</style>
<script type="text/javascript">
var iframe;
function play(idx) {
iframe.src = '';
iframe.src = '/play/' + idx;
}
window.onload = function() {
iframe = document.getElementById('iframe');
for (idx=0; idx<6; idx++) {
var button = document.createElement('button');
button.onclick = play.bind(window, idx);
button.innerHTML = 'PING!';
document.body.appendChild(button);
}
}
</script>
</head>
<body>
<iframe id="iframe" src=""></iframe>
</body></html>