树型菜单的问题 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 this问题 考验你是不是JS高手的一个问题 请问怎么打印预览指定URL(web页面)? alert问题 js能不能实现只打印web页面中的一个frame???高手帮忙啊!! javascript 高手来帮忙看看一个下拉列表的问题 如何使select变灰? js里面如何得到一个文件的大小? 高分求助,frame中的href判断问题! 请各位说说---如何在提交本页面表单时同时提交IFORM文件中的表单??? 请问如何实现左侧的文本框的数据,按提交按钮就可以到右边的文本框? 能否实现这样的效果:输入框能够透明,不遮挡渐变的背景。
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>就可以了,当然还需要“+”号的图片