大家好,做了一个后台管理,是windows xp左侧导航菜单,我把它做成了menu.ascx控件,加载到每个页面,用的是.net2003,现在的问题是,菜单初始状态是全部收起的,当打开一个功能页面后,部分菜单呈打开状态.例如: 文章管理
新闻信息添加 | 管理
文章信息添加 | 管理 当打开新闻信息添加后,菜单也呈打开状态,当提交新闻信息后,整体菜单又呈全部收起状态了.请问如何禁止提交后菜单收缩的状态.
新闻信息添加 | 管理
文章信息添加 | 管理 当打开新闻信息添加后,菜单也呈打开状态,当提交新闻信息后,整体菜单又呈全部收起状态了.请问如何禁止提交后菜单收缩的状态.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>::系统管理::</title>
</head>
<frameset cols="*" frameborder="NO" border="0" framespacing="0">
<frameset name="fst" cols="180,8,*" frameborder="NO" border="0" framespacing="0">
<frame src="Admin_Default_Left.aspx" name="leftFrame" noresize marginwidth="0" marginheight="0">
<frame src="swith.html" name="midFrame" frameborder="0" scrolling="no" noresize>
<frame src="Admin_Default_Main.aspx" name="main" noresize>
</frameset>
<noframes>
<body>
<form id="form1" runat="server">
<div style="text-align: center">
<p>
你的浏览器版本过低!!!本系统要求IE5及以上版本才能使用本系统。</p>
</div>
</form>
</body>
</noframes>
</html>
window.location.href 语句可以实现一个框架的页面在执行服务器端代码后刷新另一个框架的页面(Response.Redirect无法达到,至少我没有发现):如:index.htm页面中有二个框架,分别为 frameLeft和frameRight,在frameRight页面中执行服务器端代码后刷新frameLeft中的页面。先前最常见的是注册之后,自动刷新登陆框,让登陆框换成已登陆页面,只要在注册成功的代码之后加上一段,即可以实现刷新另个框架的页面。代码如下:Response.Write("<script language=javascript>alert('恭喜您,注册成功!')</script>");
Response.Write("<script language=javascript>window.parent.frameLeft.location.href='main.html'</script>");
<HEAD>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<LINK href="Inc/southidc.css" type="text/css" rel="stylesheet">
<style type="text/css"> BODY { MARGIN: 0px; }
.sec_menu { BORDER-RIGHT: white 1px solid; BACKGROUND: #d6dff7; OVERFLOW: hidden; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid }
.menu_title SPAN { FONT-WEIGHT: bold; LEFT: 10px; COLOR: #215dc6; POSITION: relative; TOP: 2px }
.menu_title2 SPAN { FONT-WEIGHT: bold; LEFT: 10px; COLOR: #428eff; POSITION: relative; TOP: 2px }
</style>
</HEAD>
<BODY>
<div id="x" style="OVERFLOW:scroll;HEIGHT:200px" onscroll="SetH(this)">
<table cellSpacing="0" cellPadding="0" width="158" align="center">
<tr>
<td valign="bottom" height="42">
<img height="38" srcimages/title.gif" width="158" border="0"></td>
</tr>
<tr>
<td class="menu_title" onMouseOver="this.className='menu_title2';" onMouseOut="this.className='menu_title';"
backgroundimages/title_bg_quit.gif" height="25">
<span><b><a target="_top" href="Default.aspx"><font color="#215dc6">回到首页</font></a></b>
| <a href="x.aspx"><font color="#215dc6"><b>退出 </font>
</a></B></span></td>
</tr>
<tr>
<td align="center" onMouseOver="aa('up')" onMouseOut="StopScroll()">
</td>
</tr>
</table>
<script>
var he=document.body.clientHeight -200
document.write("<div id=tt style=height:"+he+";overflow:hidden>")
</script>
<table cellspacing="0" cellpadding="0" width="158" align="center">
<tr>
<td id="imgmenu3" class="menu_title" onMouseOver="this.className='menu_title2';" onClick="showsubmenu(3)"
onMouseOut="this.className='menu_title';" background="images/menudown.gif" height="25">
<span>文章信息管理</span>
</td>
</tr>
<tr>
<td id="submenu3">
<div class="sec_menu" style="WIDTH: 158px">
<table cellspacing="3" cellpadding="0" width="130" align="center">
<tr>
<td><a href="aa.aspx "><font color="#000000">新闻类别添加</font></a></td>
</tr>
<tr>
<td><a href="bb.aspx "><font color="#000000">文章类别添加</font></a></td>
</tr>
<tr>
<td><a href="cc.aspx"><font color="#000000">文章信息添加</font></a></td>
</tr>
</table>
</div>
<br>
</td>
</tr>
<tr>
<td id="imgmenu4" class="menu_title" onMouseOver="this.className='menu_title2';" onClick="showsubmenu(4)"
onMouseOut="this.className='menu_title';" background="images/menudown.gif" height="25">
<span>信息管理</span>
</td>
</tr>
<tr>
<td id="submenu4">
<div class="sec_menu" style="WIDTH: 158px">
<table cellspacing="3" cellpadding="0" width="130" align="center">
<TR>
<TD><A href="a.aspx" ><FONT color="#000000">信息添加</FONT></A></TD>
</TR>
<TR>
<TD><A href="b.aspx" ><FONT color="#000000">类别添加</FONT></A></TD>
</TR>
</table>
</div>
<br>
</td>
</tr>
<!--统计结束**************************************-->
</table>
<DIV></DIV>
<table cellspacing="0" cellpadding="0" width="158" align="center">
<tr>
<td align="center" onMouseOver="aa('Down')" onMouseOut="StopScroll()" valign="bottom">
</td>
</tr>
</table>
<script>function aa(Dir)
{tt.doScroll(Dir);Timer=setTimeout('aa("'+Dir+'")',100)}//这里100为滚动速度
function StopScroll(){if(Timer!=null)clearTimeout(Timer)}function initIt(){
divColl=document.all.tags("DIV");
for(i=0; i<divColl.length; i++) {
whichEl=divColl(i);if(whichEl.className=="child")whichEl.style.display="none";}
}
function expands(el) {
whichEl1=eval(el+"Child");
if (whichEl1.style.display=="none"){
initIt();
whichEl1.style.display="block";
}else{whichEl1.style.display="none";}
}
var tree= 0;
function loadThreadFollow(){
if (tree==0){
document.frames["hiddenframe"].location.replace("LeftTree.asp");
tree=1
}
}function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
imgmenu = eval("imgmenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
imgmenu.background="images/menuup.gif";
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
imgmenu.background="images/menudown.gif";
}
}function loadingmenu(id){
var loadmenu =eval("menu" + id);
if (loadmenu.innerText=="Loading..."){
document.frames["hiddenframe"].location.replace("LeftTree.asp?menu=menu&id="+id+"");
}
}
top.document.title="";
</script>
<script>
var _h = 0;
function SetH(o)
{
_h = o.scrollTop
SetCookie("a",_h)}
window.onload = function(){ document.getElementById("x").scrollTop = GetCookie("a");}
function SetCookie(sName, sValue)
{
document.cookie = sName + "=" + escape(sValue) + "; ";
}
function GetCookie(sName)
{ var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
} return 0;
}
</script>
</div>
</BODY>
</HTML>