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

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

無法彈出二級菜單


window.onload=function(){

? ? var aLi=document.getElementsByTagName('li');

for(var i=0; i<aLi.length; i++){

aLi[i].onmouseover=function(){

? ? ? ? ? ? //鼠標(biāo)經(jīng)過一級菜單,二級菜單動畫下拉顯示出來

? ? ? ? ? ? ?var oSubNav=this.getElementsByTagName('ul')[0];

? ? ? ? ? ? ?if(oSubNav) {

? ? ? ? ? ? ? ? ?var This = oSubNav;

? ? ? ? ? ? ? ? ?clearInterval(This.time);

? ? ? ? ? ? ? ? ?This.time = setInterval(function() {

? ? ? ? ? ? ? ? ? ? This.style.height = this.offsetHeight + 16 +"px";

? ? ? ? ? ? ? ? ? ? if (This.offsetHeight >= 120) {

? ? ? ? ? ? ? ? ? ? ? ? clearInterval(This.time);

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? ?},30)

? ? ? ? ? ? ?}

? ??

? ??

? ??

? ??

? ??

? ??

}

? ? ? ? //鼠標(biāo)離開菜單,二級菜單動畫收縮起來。

aLi[i].onmouseout=function(){

? ? ? ? ? ? var oSubNav=this.getElementsByTagName('ul')[0];

? ? ? ? ? ? ?if(oSubNav) {

? ? ? ? ? ? ? ? ?var This = oSubNav;

? ? ? ? ? ? ? ? ?clearInterval(This.time);

? ? ? ? ? ? ? ? ?This.time = setInterval(function() {

? ? ? ? ? ? ? ? ? ? This.style.height = this.offsetHeight - 16 +"px";

? ? ? ? ? ? ? ? ? ? if (This.offsetHeight <= 0) {

? ? ? ? ? ? ? ? ? ? ? ? clearInterval(This.time);

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? ?},30)

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

}

}

}



正在回答

1 回答

如果我沒有數(shù)錯的話,你在代碼的最后少了一個"}"反括號,加上即可,除此之外?This.style.height = this.offsetHeight + 16 +"px";中的this應(yīng)為oSubNav也就是var中的This,下同。 附代碼:

window.onload=function(){
????var?aLi=document.getElementsByTagName('li');
	for(var?i=0;?i<aLi.length;?i++){
		aLi[i].onmouseover=function(){
????????????//鼠標(biāo)經(jīng)過一級菜單,二級菜單動畫下拉顯示出來
????????????var?oSubNav=this.getElementsByTagName('ul')[0];
????????????if(oSubNav){
????????????var?This=oSubNav;
????????????clearInterval(This.time);
????????????This.time=setInterval(function(){
????????????????????This.style.height=This.offsetHeight+16+"px";
????????????????????if(This.offsetHeight>=120){
????????????????????clearInterval(This.time);}
????????????????},30)
?????????????}
??????????}
????
????
????
????
????
????
????????//鼠標(biāo)離開菜單,二級菜單動畫收縮起來。		
			
????????????aLi[i].onmouseout=function(){
????????????var?oSubNav=this.getElementsByTagName('ul')[0];
?????????????if(oSubNav)?{
?????????????????var?This?=?oSubNav;
?????????????????clearInterval(This.time);
?????????????????This.time?=?setInterval(function()?{
????????????????????This.style.height?=?This.offsetHeight?-?16?+"px";
????????????????????if?(This.offsetHeight?<=?0)?{
????????????????????????clearInterval(This.time);
????????????????????}
?????????????????},30)
????????????
????????????
????????????
????????????
????????????
????????????
		????}
		
?????????}	
	}
}


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

曾老爺子 提問者

昨天我發(fā)現(xiàn)是This寫成this的時候是奔潰的
2016-09-20 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消
導(dǎo)航條菜單的制作
  • 參與學(xué)習(xí)       123855    人
  • 解答問題       838    個

水平、垂直、圓角導(dǎo)航條菜單,讓您的技術(shù)探索之路更高效

進入課程

無法彈出二級菜單

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

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

幫助反饋 APP下載

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

公眾號

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