清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
function $_class(name){ var elements = document.getElementsByTagName("*"); for(s=0;s<elements.length;s++){ if(elements[s].className==name){ return elements[s]; } } } var tabList = $_class("menuA").getElementsByTagName("li") tabCon = $_class("menuB").getElementsByTagName("ul"); for(i=0;i<tabList.length;i++){ (function(){ var t = i; tabList[t].onmouseover = function(){ for(o=0;o<tabCon.length;o++){ tabCon[o].style.display = "none"; tabList[o].className = ""; if(t==o){ this.className = "check"; tabCon[o].style.display = "block"; } } } })() }