| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 870 人关注过本帖
标题:[求助]如何修改树状菜单自动收缩
只看楼主 加入收藏
hbsxxmm
Rank: 1
等 级:新手上路
帖 子:16
专家分:0
注 册:2006-2-18
收藏
 问题点数:0 回复次数:2 
[求助]如何修改树状菜单自动收缩

这个树状菜单不能自动收缩,如何修改。点击一级目录收缩,再点击一下就展开
<%
Dim reBoard_Setting,MoreMenu
Dim classrow,iii
%>

<body bgcolor="#D6D3CE" style="font-size: 10pt">
<table border="1" width="110%" id="table1" cellspacing="0" style="border-collapse: collapse" bgcolor="#FFFFFF" cellpadding="0">
<tr>
<th align="center">
<p style="margin-top: 0"><font size="2" color="#FF0000">纳税人基本情况</font></th>
</tr>
</table>
<table width="122%" cellspacing="0" cellpadding="0" align=left class="tableBorder" size=2 color="#FF0000">
<font >
<table border="0" width="100%" id="table2">
<tr><td>
<%
SQL="select nsrid,tax_name,parentid,depth,child,ParentStr,tax_no from nsr_info order by rootid,orders"
SET Rs = Conn.Execute(SQL)
If Rs.eof Then
response.write"<br><br><br><center>目前没有信息!</center>"
response.end
Rs.close:Set Rs = Nothing
Else
SQL=Rs.GetRows(-1)
Rs.close:Set Rs = Nothing
For iii=0 To Ubound(SQL,2)
reBoard_Setting=split(SQL(5,iii),",")
Response.Write "<tr>"
Response.Write "<td height=""10"" width=""55%"" class="
Response.Write ">"
if SQL(3,iii)>"0" then
for i=1 to SQL(3,iii)
Response.Write "&nbsp;&nbsp;"
next
end if

if SQL(4,iii)>"0" then
Response.Write "<img src=""img/plus.gif"">"
else
Response.Write "<img src=""img/minus.gif"">"
end if
if SQL(2,iii)="0" then
Response.Write "<b>"
end if
Response.Write "<a style='text-decoration: none' href=nsr_edit.asp?nsrid="&SQL(0,iii)&"&amp;tax_no="&sql(6,iii)&" target='I2'>"
Response.Write SQL(1,iii)
Response.Write "</a>"
if SQL(4,iii)>"0" then
Response.Write "["
Response.Write SQL(4,iii)
Response.Write "]"
end if
%><%
MoreMenu=""
Next
End If
%>

 </table></font>
</td>
</tr>
</table>

搜索更多相关主题的帖子: 菜单 自动 
2006-03-13 11:06
islet
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:89
帖 子:6548
专家分:0
注 册:2005-1-28
收藏
得分:0 

http://www.chinaqibao.net/inc/hye.aspx

[CODE]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>中国汽保网行业</title>
<style type="text/css">
<!--
td {
font-size: 12px;
line-height: 150%;
}
body {
scrollbar-face-color:#999999;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-highlight-color:#999999;
scrollbar-shadow-color:#999999;
scrollbar-darkshadow-color:#000000;
scrollbar-arrow-color:#FFFFFF;
scrollbar-track-color:#FFFFFF;
zoom:0.25
}
img {
cursor: hand;
}
.td1 {
text-align: center;
font-size: 12px;
line-height: 14px;
color: #000000;
font-weight: bold;
background-color: efefef;
}
.std {
padding-left: 5px;
}
a:link {
font-size: 12px;
color: #000000;
text-decoration: none;
border: 1px solid #FFFFFF;
}
a:visited {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a:hover {
font-size: 12px;
color: #000000;
text-decoration: none;
border: 1px solid #666666;
background-color: #CCCCCC;
text-align: center;
line-height: 14px;
height: 16px;
}
-->
</style>
<SCRIPT language="JavaScript">
<!--
function showsubmenu(sid)
{
whichEl = eval("t" + sid);
if (whichEl.style.display == "none")
{
eval("t" + sid + ".style.display=\"\";");
document.images['img'+sid].src="images/c-2.gif";
}
else
{
eval("t" + sid + ".style.display=\"none\";");
document.images['img'+sid].src="images/c-1.gif";
}
}
parent.window.document.all.load1.style.display="none"
-->
</SCRIPT>

</head>
<body leftmargin="20" topmargin="10">
<div style="ZOOM:4">
<table width=150 border=0 cellspacing=0 cellpadding=0><tr><td width=25 align=center height=20><img src=images/c-1.gif id='img1' width=16 height=16 onClick='showsubmenu(1)'></td><td colspan=2 class=std><a href='/pages/qy.aspx?t_id_1=1' target=_top>维修设备(2025)</a></td></tr></table><table width=150 border=0 cellspacing=0 cellpadding=0 id='t1' style="display='none'"><tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link39' href='/pages/qy.aspx?t_id_2=39&t_id_1=1' target=_top>净化系统(3)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link40' href='/pages/qy.aspx?t_id_2=40&t_id_1=1' target=_top>整形机(2)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link41' href='/pages/qy.aspx?t_id_2=41&t_id_1=1' target=_top>补胎机(0)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link42' href='/pages/qy.aspx?t_id_2=42&t_id_1=1' target=_top>烤漆房(31)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link43' href='/pages/qy.aspx?t_id_2=43&t_id_1=1' target=_top>真空泵(6)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link44' href='/pages/qy.aspx?t_id_2=44&t_id_1=1' target=_top>拆胎机(12)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link45' href='/pages/qy.aspx?t_id_2=45&t_id_1=1' target=_top>焊接设备(7)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link46' href='/pages/qy.aspx?t_id_2=46&t_id_1=1' target=_top>钣金设备(3)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link47' href='/pages/qy.aspx?t_id_2=47&t_id_1=1' target=_top>硫化机(1)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link48' href='/pages/qy.aspx?t_id_2=48&t_id_1=1' target=_top>扒胎机(19)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link49' href='/pages/qy.aspx?t_id_2=49&t_id_1=1' target=_top>校正仪(14)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link50' href='/pages/qy.aspx?t_id_2=50&t_id_1=1' target=_top>举升机(287)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link51' href='/pages/qy.aspx?t_id_2=51&t_id_1=1' target=_top>烤漆机(8)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link52' href='/pages/qy.aspx?t_id_2=52&t_id_1=1' target=_top>其它(920)</a></td></tr>
</table><a name=t_2><table width=150 border=0 cellspacing=0 cellpadding=0><tr><td width=25 align=center width=18 height=20><img src=images/c-1.gif id='img2' width=16 height=16 onClick='showsubmenu(2)'></td><td colspan=2 class=std><a href='/pages/qy.aspx?t_id_1=2' target=_top>检测设备(127)</a></td></tr></table><table id='t2' style="display='none'"><tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link17' href='/pages/qy.aspx?t_id_2=17&t_id_1=2' target=_top>检测台(9)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link18' href='/pages/qy.aspx?t_id_2=18&t_id_1=2' target=_top>制动台(1)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link19' href='/pages/qy.aspx?t_id_2=19&t_id_1=2' target=_top>定位仪(26)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link20' href='/pages/qy.aspx?t_id_2=20&t_id_1=2' target=_top>内窥镜(0)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link21' href='/pages/qy.aspx?t_id_2=21&t_id_1=2' target=_top>分析仪(5)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link22' href='/pages/qy.aspx?t_id_2=22&t_id_1=2' target=_top>诊断仪(5)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link23' href='/pages/qy.aspx?t_id_2=23&t_id_1=2' target=_top>试验台(8)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link24' href='/pages/qy.aspx?t_id_2=24&t_id_1=2' target=_top>检测仪(28)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link96' href='/pages/qy.aspx?t_id_2=96&t_id_1=2' target=_top>平衡机(21)</a></td></tr>
<tr><td height=20>&nbsp;</td><td width=18 class=std><img src=images/c-3.gif width=16 height=16 border=0></td><td class=std><a id='link97' href='/pages/qy.aspx?t_id_2=97&t_id_1=2' target=_top>其它(13)</a></td></tr>
</table>
</div>
</body>
</html>
[/CODE]


[此贴子已经被作者于2006-3-13 11:26:59编辑过]

2006-03-13 11:13
islet
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:89
帖 子:6548
专家分:0
注 册:2005-1-28
收藏
得分:0 
主要代码
<SCRIPT language="JavaScript">
<!--
function showsubmenu(sid)
{
whichEl = eval("t" + sid);
if (whichEl.style.display == "none")
{
eval("t" + sid + ".style.display=\"\";");
}
else
{
eval("t" + sid + ".style.display=\"none\";");
}
}
-->
</SCRIPT>
2006-03-13 11:28
快速回复:[求助]如何修改树状菜单自动收缩
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016980 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved