树型菜单的问题 http://expert.csdn.net/Expert/topic/1986/1986285.xml?temp=.9895288http://fason.nease.net/zhuanti/tree/deeptree.rar 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://expert.csdn.net/Expert/topic/1986/1986285.xml?temp=.9895288http://fason.nease.net/zhuanti/tree/deeptree.rar var mimgpath="treeimg";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"); } 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 { document.getElementById("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 {document.getElementById("mmTree").src = mimgpath+"/top1.gif"; } }}with(document){write("<div ID=\"mmParent\"><a ID=\"mma\" href=\"#\" style=\"text-decoration:none;font-family: 宋体; font-size: 9pt; color: #000000; \" onClick=\"mFolderExpand('mm','top',null)\">");write("<img ID=\"mmTree\" src=\""+mimgpath+"/topopen1.gif\" style=\"margin-right: 5\" align=\"absmiddle\" border=\"0\">");write("<font ID=\"mTitle0\" onmouseover=\"mOver('mTitle0')\" onmouseout=\"mOut('mTitle0')\"></font></a></div>");write("<div ID=\"mmChild\"><div ID=\"mm1Parent\"><a ID=\"mm1a\" target=\"_self\" href=\"#\" "+mfonts+" onClick=\"mFolderExpand('mm1',null,'4')\" title=\"\">");write("<img ID=\"mm1Tree\" src=\""+mimgpath+"/Tplus.gif\" align=\"absmiddle\" border=\"0\"><font ID=\"mTitle1\" onmouseover=\"mOver('mTitle1')\" onmouseout=\"mOut('mTitle1')\">文件</font></a>");write("</div>");write("<div ID=\"mm1Child\" style=\"display:none;\">");write("<div ID=\"mm2Parent\"><a ID=\"mm2a\" target=\"_self\" href=\"#\" "+mfonts+" onClick=\"mFolderExpand('mm2',null,'0')\" title=\"\">");write("<img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img ID=\"mm2Tree\" src=\""+mimgpath+"/Tplus.gif\" align=\"absmiddle\" border=\"0\"><font ID=\"mTitle2\" onmouseover=\"mOver('mTitle2')\" onmouseout=\"mOut('mTitle2')\">新建</font></a>");write("</div>");write("<div ID=\"mm2Child\" style=\"display:none;\">");write("<img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><a target=\"mainFrame\" href=\"main.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle3\" onmouseover=\"mOver('mTitle3')\" onmouseout=\"mOut('mTitle3')\">新建文件</font></a><br>");write("</div>");write("<img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><a target=\"mainFrame\" href=\"main1.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle4\" onmouseover=\"mOver('mTitle4')\" onmouseout=\"mOut('mTitle4')\">新建菜单</font></a><br>");write("</div>");write("<img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><a target=\"_self\" href=\"#\" "+mfonts+" title=\"\"><font ID=\"mTitle5\" onmouseover=\"mOver('mTitle5')\" onmouseout=\"mOut('mTitle5')\">系统</font></a><br>");write("</div>");}这是用webmenushop做的调用时只要在相应的页面上写上<script language="javascript" src="menu.js"></script>就可以了,当然还需要“+”号的图片 忘记了,前面的程序应该放在以menu.js为名字的文件中 麻烦帮我看看下面代码中,js为什么不能控制提交按钮可用与不可用啊?该怎么改 ajax神奇问题 求大家解惑 jQuery中如何实现列表顺序的改变? 有没有能像VS调试C#那样调试JS的工具? 请问:如何将java解析的xml文件的数据.输入到页面的表单上? javascript刷新部分页面的问题 js调用问题 如何控制在树型菜单中复选框的状态,请帮帮忙... 如正文,求jQuery中,这种写法的相关资料和介绍 httpsessionlistener没有被执行 请问如何实现左侧的文本框的数据,按提交按钮就可以到右边的文本框? 能否实现这样的效果:输入框能够透明,不遮挡渐变的背景。
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");
}
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 { document.getElementById("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 {document.getElementById("mmTree").src = mimgpath+"/top1.gif"; }
}
}
with(document){
write("<div ID=\"mmParent\"><a ID=\"mma\" href=\"#\" style=\"text-decoration:none;font-family: 宋体; font-size: 9pt; color: #000000; \" onClick=\"mFolderExpand('mm','top',null)\">");
write("<img ID=\"mmTree\" src=\""+mimgpath+"/topopen1.gif\" style=\"margin-right: 5\" align=\"absmiddle\" border=\"0\">");
write("<font ID=\"mTitle0\" onmouseover=\"mOver('mTitle0')\" onmouseout=\"mOut('mTitle0')\"></font></a></div>");
write("<div ID=\"mmChild\"><div ID=\"mm1Parent\"><a ID=\"mm1a\" target=\"_self\" href=\"#\" "+mfonts+" onClick=\"mFolderExpand('mm1',null,'4')\" title=\"\">");
write("<img ID=\"mm1Tree\" src=\""+mimgpath+"/Tplus.gif\" align=\"absmiddle\" border=\"0\"><font ID=\"mTitle1\" onmouseover=\"mOver('mTitle1')\" onmouseout=\"mOut('mTitle1')\">文件</font></a>");
write("</div>");
write("<div ID=\"mm1Child\" style=\"display:none;\">");
write("<div ID=\"mm2Parent\"><a ID=\"mm2a\" target=\"_self\" href=\"#\" "+mfonts+" onClick=\"mFolderExpand('mm2',null,'0')\" title=\"\">");
write("<img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img ID=\"mm2Tree\" src=\""+mimgpath+"/Tplus.gif\" align=\"absmiddle\" border=\"0\"><font ID=\"mTitle2\" onmouseover=\"mOver('mTitle2')\" onmouseout=\"mOut('mTitle2')\">新建</font></a>");
write("</div>");
write("<div ID=\"mm2Child\" style=\"display:none;\">");
write("<img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><a target=\"mainFrame\" href=\"main.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle3\" onmouseover=\"mOver('mTitle3')\" onmouseout=\"mOut('mTitle3')\">新建文件</font></a><br>");
write("</div>");
write("<img src=\""+mimgpath+"/I.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><a target=\"mainFrame\" href=\"main1.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle4\" onmouseover=\"mOver('mTitle4')\" onmouseout=\"mOut('mTitle4')\">新建菜单</font></a><br>");
write("</div>");
write("<img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><a target=\"_self\" href=\"#\" "+mfonts+" title=\"\"><font ID=\"mTitle5\" onmouseover=\"mOver('mTitle5')\" onmouseout=\"mOut('mTitle5')\">系统</font></a><br>");
write("</div>");
}
这是用webmenushop做的
调用时只要在相应的页面上写上<script language="javascript" src="menu.js"></script>就可以了,当然还需要“+”号的图片