<div></div> <script type="text/javascript"> var i = 0; document.onmousemove = function(){ document.getElementsByTagName('div')[0].innerHTML = ++i/100; }; </script>