亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

幫我看下,為什么我使用鏈式調用時,函數不會執行,為什么?

幫我看下,為什么我使用鏈式調用時,函數不會執行,為什么?

請讓我安靜一會兒 2018-12-16 13:00:37
function?getComputer(obj,attr){ ????if(obj.currentStyle){ ????????return?obj.currentStyle[attr]; ????}else{ ????????return?getComputedStyle(obj,false)[attr]; ????} } function?startMove(obj,attr,target,fn)?{ ????????clearInterval(obj.timer); ????obj.timer=setInterval(function(){ ????????if(attr=="opacity"){ ????????????var?cur=Math.round(parseFloat(getComputer(obj,attr))*100); ????????}else{ ????????????var?cur=parseInt(getComputer(obj,attr)); ????????} ????????var?speed=target-cur; ????????speed>0??(speed=Math.ceil(speed/3)):(speed=Math.floor(speed/3)); ????????if(cur==target){ ????????????clearInterval(obj.timer); ????????????if(fn){ ????????????????fn(); ????????????} ????????}else{ ????????????if(attr=="opacity"){ ????????????????//?obj.style.filter=Alpha("opacity:'+(cur+speed)+"); ????????????????obj.style.opacity=(speed+cur)/100; ????????????}else{ ????????????????obj.style[attr]=cur+speed+"px"; ????????????} ????????} ????},300) }
查看完整描述

1 回答

?
聰明的湯姆

TA貢獻112條經驗 獲得超33個贊

請問你哪里使用了鏈式調用?

查看完整回答
反對 回復 2018-12-17
  • 1 回答
  • 0 關注
  • 816 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號