bug...bug
我这里出现一连串的bug- -
我这里出现一连串的bug- -
2015-06-17
<script language="javascript">
window.onload = function(){
var aLi = document.getElementsByTagName('li');
for(var i=0;i<aLi.length;i++){
aLi[i].onmouseover = 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>=120)
clearInterval(This.time);
},30)
}
}
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)
}
}
}
}
</script>
举报