/ Published in: HTML

This will refresh an image based on time, all in one line of code. Change the image name/path and the time to refresh in milliseconds.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<img src=â€image.jpg†id=â€reloader†onload=â€setTimeout(’document.getElementById(\’reloader\’).src=\’image.jpg?\’+new Date().getMilliseconds()’, 5000)†/>
URL: http://www.arnoldb.com/2009/06/06/refresh-an-image-with-a-single-line-of-code/
Comments
