Javascript refresh + countdown text -
i using following javascript in header refresh page
<script type="text/javascript"> <!-- function timedrefresh(timeoutperiod) { settimeout("location.reload(true);",timeoutperiod); } // --> </script>
and in body tag
<body onload="javascript:timedrefresh(5000);">
my question how add text showing countdown refresh page
x seconds refresh
does suit needs?
(function countdown(remaining) { if(remaining <= 0) location.reload(true); document.getelementbyid('countdown').innerhtml = remaining; settimeout(function(){ countdown(remaining - 1); }, 1000); })(5); // 5 seconds
Comments
Post a Comment