您的位置:首页 > 编程语言

在框架中,可以实现折叠框架效果代码

2007-02-04 13:39 549 查看
Main.htm
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
</head>
<frameset rows="102,*" frameborder="NO" border="0" framespacing="0" name="topset">
<frame name="topFrame" scrolling="NO" noresize src="Top.aspx">
<frameset rows="*" cols="204,*" framespacing="0" frameborder="no" border="0" name="middleset">
<frame name="leftFrame" noresize src="left.aspx">
<frameset rows="*" cols="5,*" framespacing="0" frameborder="NO" border="0">
<frame src="spliter.aspx" name="spliterFrame" scrolling="NO" noresize>
<frame name="mainFrame" src="Main.aspx">
</frameset>
</frameset>
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>
</html>

Top.aspx为顶部页
left.aspx为左边菜单页
spliter.aspx为控制页(控制left.aspx)
Main.aspx为默认内容页

spliter.aspx
<%@ Page language="c#" Codebehind="Spliter.aspx.cs" AutoEventWireup="false" Inherits="LiTianPing.Web.Spliter" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html>
<head>
<title>Spliter</title>
<style type="text/css">
<!--
a { color: <%=Application[Session["Style"].ToString()+"xtree_bgcolor"]%>; text-decoration: none}
a:hover { color:red;text-decoration: none}
-->
</style>
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
</head>
<body bgcolor='<%=Application[Session["Style"].ToString()+"xspliter_color"]%>' leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="if(parent.middleset.cols='0,*'){parent.middleset.cols='<%=Application[Session["Style"].ToString()+"xleft_width"]%>,*'}" onClick="if(parent.middleset.cols!='0,*'){parent.middleset.cols='0,*'}else{parent.middleset.cols='<%=Application[Session["Style"].ToString()+"xleft_width"]%>,*'};" style="cursor: hand">

<form id="Form1" method="post" runat="server">
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</p>
<br/>
<table width="5" height="70" border="0" cellpadding="0" cellspacing="0" bgcolor='<%=Application[Session["Style"].ToString()+"xspliter_color"]%>'>
<tr>
<td height="2" bgcolor='<%=Application[Session["Style"].ToString()+"xtree_bgcolor"]%>'></td>
</tr>
<tr>
<td><font color='<%=Application[Session["Style"].ToString()+"xtree_bgcolor"]%>'>]</font></td>
</tr>
<tr>
<td height="2" bgcolor='<%=Application[Session["Style"].ToString()+"xtree_bgcolor"]%>'></td>
</tr>
</table>
</form>

</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: