第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

加入鏈?zhǔn)絼赢嫷拇a后會出現(xiàn)一個問題?:多1.js:21 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

錯誤提示加了注釋的2行有問題!

只能有第一個動畫,第二個無法進(jìn)行。錯誤一直累計。百度沒找到解決方法,求教!

op.onmouseover=function(){yd(this,"height",300,function(){yd(this,"width",400);});}

op.onmouseout=function(){yd(this,"height",150,function(){yd(this,"width",200);});}



function getStyle(obj,attr)

{

if(obj.currentStyle){return obj.currentStyle[attr];}

//else { return getComputedStyle(obj,false)[attr];}

}

//iccr=parseInt(getStyle(obj,attr));

正在回答

2 回答

我猜是this的的作用域問題,onmouseover內(nèi)的function函數(shù)應(yīng)該把this傳參,因為第二個function中的this不再指向op本身。相關(guān)的this 問題我也不太明白,正學(xué)習(xí)

應(yīng)改為

op.onmouseover = function() {

var that = this //將this傳參

yd(that, "height", 300, function() {

yd(that,"width",400); });

}

不知道對不對,共勉。

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

謝謝你,我想起來了,

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

舉報

0/150
提交
取消

加入鏈?zhǔn)絼赢嫷拇a后會出現(xiàn)一個問題?:多1.js:21 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

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

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

幫助反饋 APP下載

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

公眾號

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