请大家帮我看看这段树型菜单的代码,如果要增加下级菜单的话怎么写?急急!!!
请大家帮我看看这段树型菜单的代码,如果要增加下级菜单的话怎么写?急急!!!
文件名:menu.js
var mimgpath= "images/ ";
var mfonts= "style=\ "text-decoration:none;font-family: 宋体; font-size: 9pt; color: #000000; \ " ";
var movercolor= "#0000FF ";
var mnormalcolor= "#000000 ";
var NC6=(navigator.userAgent.indexOf( "Netscape6 ")> 0)?true:false;
var IE=(document.all)?true:false;
function mOver(id) {
if (IE) {eval(id).style.color=movercolor; }
else if(NC6){ document.getElementById(id).style.color=movercolor;}
}
function mOut(id) {
if (IE) {eval(id).style.color=mnormalcolor; }
else if(NC6){ document.getElementById(id).style.color=mnormalcolor;}
}
function mFolderExpand($1,$2,pic) {
if (IE) { mExpandIE($1,$2,pic) }
else if(NC6){ mExpandNC($1,$2,pic) }
}
function mExpandIE($1,$2,pic) {
Expanda = eval($1 + "a ");
Expanda.blur()
ExpandChild = eval($1 + "Child ");
if ($2 != "top ") {
ExpandTree = eval($1 + "Tree ");
ExpandFolder = eval($1 + "Folder ");
}
if (ExpandChild.style.display == "none ") {
ExpandChild.style.display = "block ";
if ($2 != "top ") {
if ($2 == "last ") { ExpandTree.src = mimgpath+ "/Lminus.gif "; }
else { ExpandTree.src = mimgpath+ "/Tminus.gif "; }
ExpandFolder.src = mimgpath+ "/openfolder "+pic+ ".gif ";
}
else { mmTree.src = mimgpath+ "/topopen1.gif "; }
}else{
ExpandChild.style.display = "none ";
if ($2 != "top ") {
if ($2 == "last ") { ExpandTree.src = mimgpath+ "/Lplus.gif "; }
else { ExpandTree.src = mimgpath+ "/Tplus.gif "; }
ExpandFolder.src = mimgpath+ "/folder "+pic+ ".gif ";
}
else { mmTree.src = mimgpath+ "/top1.gif "; }
}
}
function mExpandNC($1,$2,pic) {
Expanda = document.getElementById($1 + "a ");
Expanda.blur()
ExpandChild = document.getElementById($1 + "Child ");
if ($2 != "top ") {
ExpandTree = document.getElementById($1 + "Tree ");
ExpandFolder = document.getElementById($1 + "Folder ");