div+iframe代替frameset
frameset和frame标签已经过时了。
框架集不能定义在body标签
HTML框架 - csnmd - 博客园 (cnblogs.com)
<html>
<head>
<title>网上书店</title>
<style>
body {
margin: 0;
padding: 0;
border: 0;
overflow: hidden;
height: 100%;
max-height: 100%;
}
#frameTop {
position: absolute;
top: 0;
left: 0;
height: 100px;
width: 100%;
overflow: hidden;
vertical-align: middle;
}
#frameContentLeft {
position: fixed;
top: 100px;
left: 0;
height: 100%;
width: 150px;
overflow: hidden;
vertical-align: top;
background-color: #D2E6FA;
}
#frameContentRight {
position: absolute;
left: 150px;
top: 100px;
height: 100%;
width: 100%;
right: 0;
bottom: 0;
overflow: hidden;
background: #fff;
}
</style>
</head>
<body>
<div>
<iframe name="frameTop" id="frameTop" src="top.aspx"></iframe>
</div>
<div>
<iframe name="frameContentLeft" id="frameContentLeft" src="left.aspx"></iframe>
<iframe name="frameContentRight" id="frameContentRight" src="main.aspx"></iframe>
</div>
</body>
</html>
下面在Left.aspx中调用不同的页面:
<div>
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
<br />
<br />
<asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="www.baidu.coom">LinkButton</asp:LinkButton>
<br />
<a href="main.aspx" target="frameContentRight">Link text1</a>
<a href="main2.aspx" target="frameContentRight">Link text2</a>
</div>
浙公网安备 33010602011771号