最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

move.js說我第二行 Uncaught TypeError: Cannot read property 'currentStyle' of undefined

function getStyle(obj,attr){

if (obj.currentStyle) {

return obj.currentStyle[attr];

}

else{

return getComputedStyle(obj,false)[attr];

}

}



function startMove(obj,attr,iTarget,fn){

clearInterval(obj.timer);

obj.timer =setInterval(function(){

var icur = 0;

if (attr =='opacity') {

icur = Math.round( parseFloat(getStyle(obj.attr))*100);

}

else{

icur = parseInt(getStyle(obj,attr));

}

var speed =(iTarget-icur)/8;

speed=speed>0?Math.ceil(speed):Math.floor(speed);

if (icur==iTarget) {

clearInterval(obj.timer);

if (fn) {

fn();

}

}

else{

if (attr=='opacity') {

obj.style.filter='alpha(opacity:'+(icur+speed)+')';

obj.style.opacity =(icur+speed)/100;

}

else{

obj.style[attr] =icur+speed+'px';

}

}

},30)

}



正在回答

3 回答

兼容性問題吧

0 回復(fù) 有任何疑惑可以回復(fù)我~

?傳值得問題,你用console.log()檢查一下調(diào)用getStyle函數(shù)那個(gè)值有值沒用

0 回復(fù) 有任何疑惑可以回復(fù)我~

應(yīng)該是瀏覽器問題吧 ?

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

move.js說我第二行 Uncaught TypeError: Cannot read property 'currentStyle' of undefined

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)