日期:2014-05-17  浏览次数:20832 次

如何做这种导航
http://www.qzhfstone.com/product/index.asp?ClassID=2

就像这个站左边的那样,点下主目录能出现子目录的(主目录和子目录是从数据库中读取出的)

谢了……

------解决方案--------------------
首先将主目录和子目录从数据库读出,然后将子目录隐藏,当点击主目录时,通过判断子目录是否显示的标志位来使其显示或隐藏。
我是这样实现的,各位应该有更好的方法。
------解决方案--------------------
http://blog.csdn.net/snlixing/archive/2007/06/09/1645018.aspx
------解决方案--------------------
给你段代码你自己改改吧


<HTML> <HEAD> <TITLE> 管理页面 </TITLE>
<META http-equiv=Content-Type content= "text/html; charset=gb2312 ">


<SCRIPT language=javascript>
function showsubmenu(sid)
{
whichEl = eval( "submenu " + sid);
if (whichEl.style.display == "none ")
{
eval( "submenu " + sid + ".style.display=\ "\ "; ");
}
else
{
eval( "submenu " + sid + ".style.display=\ "none\ "; ");
}
}
</SCRIPT>

<META content= "MSHTML 6.00.2900.2135 " name=GENERATOR> </HEAD>
<BODY leftMargin=0 topMargin=0 marginheight= "0 " marginwidth= "0 ">
<TABLE cellSpacing=0 cellPadding=0 width= "100% " align=left border=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width=158 align=center>
<TBODY>
<TR>
<TD vAlign=bottom height=42> <IMG height=38
src= "Image/title.gif " width=158> </TD>
</TR> </TBODY> </TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=158 align=center>
<TBODY>
<TR>
<TD class=menu_title onMouseOver= "this.className= 'menu_title2 '; "
onmouseout= "this.className= 'menu_title '; "
background=Image/title_bg_quit.gif height=25> <SPAN> <A
href= "Admin_Main.asp "
target=main> <B> 管理首页 </B> </A> | <A
href= "Out_Log.asp "
target=_top> <B> 退出 </B> </A> </SPAN> </TD>
</TR> </TBODY> </TABLE> &nbsp;
<TABLE cellSpacing=0 cellPadding=0 width=158 align=center>
<TBODY>
<TR>
<TD class=menu_title id=menuTitle1
onmouseover= "this.className= 'menu_title2 '; " style= "CURSOR: hand "
onclick=showsubmenu(0) onMouseOut= "this.className= 'menu_title '; "
background=Image/admin_left_1.gif height=25> <SPAN> 费用管理 </SPAN> </TD>
</TR>
<TR>
<TD id=submenu0 style= "DISPLAY: none ">
<DIV class=sec_menu style= "WIDTH: 158px ">
<TABLE cellSpacing=0 cellPadding=0 width=150 align=center>
<TBODY>
<TR>
<TD height=5> </TD>
</TR>
<TR>
<TD height=20> <IMG height=20 alt= " "
src= "Image/bullet.gif " width=15 border=0> <a