вот пример:
<html><head><script type="text/javascript">
window.onload = function ()
{
setInterval(function()
{
var id = document.getElementById('div1');
var left = (parseInt(id.style.left));
id.style.left = left + 10;
}, 1000);
}
</script></head><body>
<div id="div1" style="position: absolute; top: 50px; left: 100px; width: 50px; height: 50px; background-color: yellow;">dfg</div>
</body></html>