除了flag那個問題外,個人覺得從優化程序執行的角度上來講
if(attr=='opacity'){obj.style.filter='alpha(opacity:'+(icur+speed)+')';obj.style.opacity=(icur+speed)/100;} else{
obj.style[attr]=icur+speed+'px';}這幾行應插入到if(icur!=json[attr]){}這里面去
if(attr=='opacity'){obj.style.filter='alpha(opacity:'+(icur+speed)+')';obj.style.opacity=(icur+speed)/100;} else{
obj.style[attr]=icur+speed+'px';}這幾行應插入到if(icur!=json[attr]){}這里面去
2014-12-19
if(oDiv.offsterLeft == 0){
clearInterval(timer)
}
做到這個地方 好像清除沒有實現 一直繼續還在運動 不知道哪里出問題
clearInterval(timer)
}
做到這個地方 好像清除沒有實現 一直繼續還在運動 不知道哪里出問題
2014-12-18