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

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

鏈?zhǔn)竭\動的回調(diào)函數(shù)不執(zhí)行

回調(diào)函數(shù)不執(zhí)行是為什么啊

正在回答

2 回答

<html xmlns="http://www.w3.org/1999/xhtml"> ? ?

<head> ? ?

<meta charset="UTF-8"/> ? ?

<meta name="Generator" content="EditPlus?"/> ? ?

<meta name="Author" content=""/> ? ?

<meta name="Keywords" content=""/> ? ?

<meta name="Description" content=""/> ? ?

<title>Document</title> ? ?

<style type="text/css"> ? ?

/* css默認(rèn)樣式重置 */ ? ?

body,p,h1,h2,h3,ul,li{margin:0;padding:0;font-size:12px;} ? ?

ul{list-style:none;} ? ?

a{text-decoration:none;} ? ?

img{border:none;vertical-align:top;} ? ?

li{width:200px;height:100px;background:yellow;margin-bottom:20px;border:4px solid black;filter:alpha(opacity:30);opacity:0.3;} ? ?

</style> ? ?

<script type="text/javascript"> ? ?

window.onload=function(){ ? ?

var Li=document.getElementById("li1"); ? ?

Li.onmouseover=function(){ ? ?

startMove(Li,"width",400,function(){ ? ?

startMove(Li,"height",200,function(){ ? ?

startMove(Li,"opacity",100);}); ? ?

}); ? ?

} ? ?

Li.onmouseout=function(){ ? ?

startMove(Li,"opacity",30,function(){ ? ?

startMove(Li,"height",100,function(){ ? ?

startMove(Li,"width",200);}); ? ?

}); ? ?

} ? ?

function startMove(obj,att,iTarget,fn){ ? ?

clearInterval(obj.timer); ? ?

obj.timer=setInterval(function(){ ? ?

var icur=0; ? ?

if(att=="opacity"){ ? ?

icur=Math.round(parseFloat(getStyle(obj,att))*100); ? ?

}else{ ? ?

icur=parseInt(getStyle(obj,att)); ? ?

} ? ?

var speed=(iTarget-icur)/8; ? ?

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

if(obj.icur==iTarget){ ? ?

clearInterval(obj.timer); ? ?

fn && fn();//回調(diào)函數(shù) ? ?

}else{ ? ?

if(att=="opacity"){ ? ?

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

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

}else{ ? ?

obj.style[att]=icur+speed+"px";} ? ?

} ? ?

},30); ? ?

} ? ?

function getStyle(obj, attr){ ? ?

return obj.currentStyle?obj.currentStyle[attr]:getComputedStyle(obj)[attr]; ? ?

} ? ?

} ? ?

</script> ? ?

</head> ? ?

<body> ? ?

<ul> ? ?

<li id="li1"></li> ? ?

</ul> ? ?

</body> ? ?

</html> ? ?


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

你在startMove函數(shù)里面做過對回調(diào)函數(shù)的定義么?把代碼貼出來看下

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

舉報

0/150
提交
取消

鏈?zhǔn)竭\動的回調(diào)函數(shù)不執(zhí)行

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

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

幫助反饋 APP下載

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

公眾號

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