求代码或解决方法.

huisheng 2004-07-08 01:23:11
我想做一个像csdn 的左边菜单一样的菜单..

能显示.隐藏.

左边菜单内部的就不要了.

谢谢
我在线...
...全文
73 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wanghr100 2004-07-08
  • 打赏
  • 举报
回复
demo.htm

<frameset cols="92,*" id="baobao">
<frame src="left.htm" name="leftFrame" scrolling="NO" >
<frame src="main.htm" name="mainFrame">
</frameset>

left.htm

Left..

main.htm

<input type=button onclick="window.parent.baobao.cols='0,100%'" value="隐藏">
<input type=button onclick="window.parent.baobao.cols='92,*'" value="显示">
huisheng 2004-07-08
  • 打赏
  • 举报
回复
如何设置<IFRAME>的自动高度设置为100%就什么也没有了
青团子 2004-07-08
  • 打赏
  • 举报
回复
<SCRIPT language="Javascript">
function switchSysBar(){
if (switchPoint.innerText==3){
switchPoint.innerText=4
document.all("mnuList").style.display="none"
}
else{
switchPoint.innerText=3
document.all("mnuList").style.display=""
}
}

function switchSysBar1(){
if (switchPoint1.innerText==5){
switchPoint1.innerText=6
document.all("ThisTitle").style.display="none"
}
else{
switchPoint1.innerText=5
document.all("ThisTitle").style.display=""
}
}

</SCRIPT>
<TABLE height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0" ID="Table1">
<TBODY>
<TR>
<TD id="ThisTitle" vAlign="center" noWrap align="middle" width="100%" colSpan="3" height="15%"><IFRAME name="banner" src="上部导航栏页面相对路径和名称" frameBorder="0" width="100%" scrolling="no" height="100%" target="contents"></IFRAME></TD>
<TR>
<TD id="mnuList" vAlign="center" noWrap align="middle" width="15%" height="100%"><IFRAME id="left" name="left" src="左面树桩菜单页面相对路径和名称" frameBorder="0" width="100%" scrolling="no" height="100%" target="main"></IFRAME>
<TD width="1%" bgColor="#005d99" height="100%">
<TABLE height="100%" cellSpacing="0" cellPadding="0" border="0" ID="Table2">
<tr>
<TD onclick="switchSysBar1()" valign="bottom" width="100%" height="1" bgColor="#f8f8f8" colSpan="1" rowSpan="1"><font style="FONT-SIZE: 9pt; CURSOR: hand; COLOR: #72b2fa; FONT-FAMILY: Webdings"><SPAN id="switchPoint1" title="打开/关闭上边导航栏">5</SPAN></font></TD>
</tr>
<tr>
<TD onclick="switchSysBar()" width="3" valign="top" height="50%" bgColor="#f8f8f8"><font style="FONT-SIZE: 9pt; CURSOR: hand; COLOR: #72b2fa; FONT-FAMILY: Webdings"><SPAN id="switchPoint" title="打开/关闭左边导航栏">3</SPAN></font></TD>
</tr>
</TABLE>
</TD>
<TD height="100%"><IFRAME id="main" name="FrmRight" src="右边主页面相对路径和名称" frameBorder="0" width="100%" scrolling="yes" height="100%"></IFRAME></TD>
</TR>
</TBODY></TABLE>
gjd111686 2004-07-08
  • 打赏
  • 举报
回复
左边用http://fason.nease.net/的树吧!
gjd111686 2004-07-08
  • 打赏
  • 举报
回复
<style>
.SwitchClass{color:black;cursor:hand;font-family:webdings;font-size:9pt}
</style>
<body>
<script language="javascript">
function SwitchMenuStatus()
{
if(SwitchMenu.innerText==3)
{
SwitchMenu.innerText=4;
document.all("Menu").style.display="none";
}
else
{
SwitchMenu.innerText=3;
document.all("Menu").style.display="";
}
}


function OpenMenu()
{
if(SwitchMenu.innerText==4)
{
SwitchMenu.innerText=3;
document.all("Menu").style.display="";
}
else
{
SwitchMenu.innerText=3;
document.all("Menu").style.display="";
}
}

</script>
<table width="100%" border="1" cellpadding="3" cellspacing="0" height="100%" bordercolor="#EEEEEE" bordercolordark="#FFFFFF" bordercolorlight="#999999">
<tr>
<td id=Menu name="Menu" vAlign=top align=left>
<iframe src="about:blank" style="height:100%;visibility:inherit;width:100" border="0" frameborder=0></iframe>
</td>
<td width="5" height="100%" onmouseover="OpenMenu();">
<table border=0 cellPadding=0 cellSpacing=0>
<tr>
<td style="height: 100%;" valign=middle onclick="SwitchMenuStatus();">
<span class=SwitchClass id=SwitchMenu title="关闭/打开菜单">3</span>
</td>
</tr>
</table>
</td>
<td id=Home name="Home" vAlign=top align=left width="100%">
<iframe src="about:blank" style="height:100%;visibility:inherit;width:100%" border="0" frameborder=0></iframe>
</td>
<tr>
</table>
huisheng 2004-07-08
  • 打赏
  • 举报
回复
没人帮我.自己UP

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧