var count=0;//Make a counter
var limit=new Array();//Used to record which menus are currently displayed
var countlimit=1;//Open menus at the same time Number, can be customized
function expandIt(el) {
obj = eval("" el);
if (obj.style.display == "none") {
obj.style. display = "block";//Display submenu
if (countlimit[count]=el;//Enter array
count;
}
else {
eval("" limit[0]).style.display = "none";
for (i=0;ilimit[limit.length-1]=el;
}
}
else {
obj.style.display = "none";
var j;
for (i=0;ifor (i=j;ilimit[limit.length-1]=null;//Delete the last digit of the array
count--;
}
}
// - ->
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn