<style type="text/css">
div {
background: blue;
position: absolute;
width: 100px;
height: 100px;
}
</style>
<script type="text/javascript">
window.onload = function(){
var i = 0;
(function(){
if(++i <= 200){
var element = document.getElementsByTagName('div')[0];
element.style.left = i+'px';
setTimeout(arguments.callee, 10);
}
else {
alert('finished');
}
})();
};
</script>
<div></div>