日期:2014-05-17 浏览次数:20406 次
window.onload=function(){ var dom=document.getElementsByTagName("li"); for(var i=0;i<dom.length;i++){ if (dom[i].childNodes.length > 0) { for (var j=0,l=dom[i].childNodes.length;j<l ;j++ ) { if (dom[i].childNodes[j].tagName == "UL") { dom[i].onmouseover=function(){ for (var i=0,l=this.childNodes.length;i<l ;i++ ) { if (this.childNodes[i].tagName == "UL") { this.childNodes[i].style.display=''; } } } dom[i].onmouseout=function(){ for (var i=0,l=this.childNodes.length;i<l ;i++ ) { if (this.childNodes[i].tagName == "UL") { this.childNodes[i].style.display='none'; } } } } } } } }