clearInterval(my_Time); 怎么不起作用啊 ?
function startMove () {
var oDiv = document.getElementById('box');
my_Time=setInterval(function(){
if(oDiv.offsetLef==0){
clearInterval(my_Time);
}else{
oDiv.style.left = oDiv.offsetLeft+1+"px";?
}
},30);
};
function startMove () {
var oDiv = document.getElementById('box');
my_Time=setInterval(function(){
if(oDiv.offsetLef==0){
clearInterval(my_Time);
}else{
oDiv.style.left = oDiv.offsetLeft+1+"px";?
}
},30);
};
2016-02-21
舉報
2016-02-22
function?startMove?()?{ ????var?oDiv?=?document.getElementById('box'); ????my_Time=setInterval(function(){ ????????if(oDiv.offsetLefT==0){ ????????????clearInterval(my_Time); ????????}else{ ????????????oDiv.style.left?=?oDiv.offsetLeft+1+"px";? ????????} ????},30); };第四行offsetLeft沒打對!