frameset and examples

如果a.html包括了其他页面,则要求a.html文件不能包含有body 和body 体的内容。

Contain.html是用来保护其他页面的:code

<frameset cols="20%,*">

<frame name="fr1"src="a.html" noresize="noresize" frameborder="0"/>

<frame name="fr2"src="b.html" noresize="noresize" frameborder="0"/>

 

But we should definitely remember you can’tcontain any <body>tag and <body>content in this file.

 

a.html: left content

<html>

<bodystyle="background-color:#000066">

<a href="b.html"target="fr2">lyric1</a><br />

<a href="c.html"target="fr2">lyric2</a><br />

</body>

</html>

         Target’sattributes have four values: 1._blank: open a new page;

         2. _self: openin the same page. (replace this page)

         3. _top: thewhole browser

         4. _parent: theparent window

         5. self-define:just like <frame>

b.html:

c.html:

And we can change the pages on the rightside.

 

<!---------------------------------------------------------------------------------------------------------------------------->

Exercise:

All.html

<html>

         <frameset rows="20%,*"frameborder="0">

                   <framesrc="head.html" scrolling="no"noresize="noresize"/>

         <frameset cols="20%,*"frameborder="0" >

                   <framesrc="left.html" noresize="noresize" />

                   <framesrc="content.html" noresize="noresize"/>

         </frameset>

         </frameset><noframes></noframes>

</html>

Head.html

Left.html

<html>

<bodybgcolor="pink">

         <ul>

                   <li><ahref="#">rock and roll</a></li>

                   <li><ahref="#">gilr</a></li>

         </ul>

</body>

</html>

Right.html

<html>

<bodybgcolor="#C0C0C0">

alllyric

</body>

</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值