如果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>