Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<html> <head> <title>Example</title> <script> <!-- function timedRefresh(timeoutPeriod) { setTimeout("location.reload(true);",timeoutPeriod); } window.onload = timedRefresh(5000); // --> </script> </head> <body> <p>This page will refresh every 5 seconds. This is because we're using the 'onload' event to call our function. We are passing in the value '5000', which equals 5 seconds.</p> <img src="/pix/samples/4s.jpg" alt="Sample image"> <p>But hey, try not to annoy your users too much with unnecessary page refreshes every few seconds!</p> </body> </html>
Preview