-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
48 lines (39 loc) · 1.16 KB
/
Copy pathtest.html
File metadata and controls
48 lines (39 loc) · 1.16 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
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Auto Reload</title>
</head>
<body>
<img src='https://takagihitoshi.github.io/Lorenz.gif' width="800px">
<button id="button1">Full Screen</button>
</body>
<script>
// ページをreload
function doReloadNoCache() {
// キャッシュを無視してサーバーからリロード
window.location.reload(true);
}
window.addEventListener('load', function () {
// ページ表示完了した5秒後にリロード
setTimeout(doReloadNoCache, 10000);
});
window.addEventListener('load', function(){
// フルスクリーン表示
document.getElementById('button1').addEventListener('click', function(){
// Chrome & Firefox v64以降
if( document.body.requestFullscreen ) {
document.body.requestFullscreen();
// Firefox v63以前
} else if( document.body.mozRequestFullScreen ) {
document.body.mozRequestFullScreen();
// Safari & Edge & Chrome v68以前
} else if( document.body.webkitRequestFullscreen ) {
document.body.webkitRequestFullscreen();
// IE11
} else if( document.body.msRequestFullscreen ) {
document.body.msRequestFullscreen();
}
});
});
</script>