function changefn(i){
for(j=0;j<linode.length;j++){
if(j===i){
linode[j].className ="active" ;
tagnode[(j+1)].className = "show" ;
}
else{
linode[j].className = "" ;
tagnode[(j+1)].className = "hide";
}
}
}
window.onload = function() {
var linodes = document.getElementById("ul1");
var linode = linodes.childNodes;
var tagnode = document.getElementById("tab-list").childNodes;
for(i=0;i<linode.length;i++){
linode[i].setAttribute("onmouseover",changefn(i));
}// JS实现选项卡切换
}
stone310
相关分类