<script>
var oTime = null;  //为何不能放在函数体内?
function move(){
      //var oTime = null  ????
   var oDiv = document.getElementById('div1');
   
    clearInterval(oTime);

oTime = setInterval(function(){

//先判断  如果左边坐标大于600 停止运动
if(oDiv.offsetLeft >=600){

clearInterval(oTime);
}
//否则 左边坐标+10;
else
{
var speed = 1;

oDiv.style.left = oDiv.offsetLeft+speed+'px';

  }     },30); 

}</script>