var aLi=document.getElementsByTagName('li');
for(var i=0; i<aLi.length; i++){
aLi[i].onmouseover=function(){
//鼠标经过一级菜单,二级菜单动画下拉显示出来
var uls=this.getElementsByTagName("ul")[0];
if(uls){
var This=uls; //why要用This?
clearInterval(This.timer);
This.timer=setInterval(function(){
This.style.height=This.offsetHeight+15+"px";
if(This.offsetHeight>=120)
clearInterval(This.timer);
},30)
}
相关分类