div+iframe代替frameset

 frameset和frame标签已经过时了。

框架集不能定义在body标签

 

HTML框架 - csnmd - 博客园 (cnblogs.com)

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<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>

posted @   81  阅读(61)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
点击右上角即可分享
微信分享提示