<div></div> <script type="text/javascript"> window.onload = function(){ var i = 31; (function(){ if(--i>0){ document.getElementsByTagName('div')[0].innerHTML = i; } window.setTimeout(arguments.callee, 1000); })(); }; </script>