-
Notifications
You must be signed in to change notification settings - Fork 1
/
dash.html
35 lines (30 loc) · 1.03 KB
/
dash.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
<html>
<head>
<script>
// https://stackoverflow.com/questions/1077041/refresh-image-with-a-new-one-at-the-same-url
function refresh(node)
{
var times = 1000; // gap in Milli Seconds;
(function startRefresh()
{
var address;
if(node.src.indexOf('?')>-1)
address = node.src.split('?')[0];
else
address = node.src;
node.src = address+"?time="+new Date().getTime();
setTimeout(startRefresh,times);
})();
}
window.onload = function()
{
var node = document.getElementById('img');
refresh(node);
// you can refresh as many images you want just repeat above steps
}
</script>
</head>
<body>
<img id="img" src="figure.svg" style="height: 100%" alt="image busy">
</body>
</html>