報錯:Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'
li1.onmouseover=function(){? ????startMove(li1,"height",300,function(){???????? ????????startMove(this,"width",600);?????? ???????});???? ?????};
如果第二層函數(shù)里面寫this而不懈li1就回報這個錯,這是為什么呢?
2019-01-09
回調(diào)函數(shù) 不可用this ?可以在前面聲明一個 var that=this;將this賦予that。
2020-03-25
用that也沒有效果啊
2019-02-03
不是不能用this。。。而是你那個指代的并不是個元素,你看報錯信息就知道了,你是想給元素設(shè)置動畫不是給window 設(shè)置。。