posts - 262,  comments - 221,  trackbacks - 0
一、HTML的<frame>:
<frameset cols="25%,75%">
   
<frame src="frame_a.htm">
   
<frame src="frame_b.htm">
</frameset>

二、HTML的<noframes>:
<html>
<frameset cols="25%,50%,25%">

  
<frame src="frame_a.htm">
  
<frame src="frame_b.htm">
  
<frame src="frame_c.htm">

  
<noframes>
  
<body>
   Your browser does not handle frames!   
  
</body>
  
</noframes>

</frameset>
</html>

You cannot use the <body></body> tags together with the <frameset></frameset> tags! However, if you add a <noframes> tag containing some text for browsers that do not support frames, you will have to enclose the text in <body></body> tags!

备注:

一般情况下不能将<body></body>标记和<frameset></frameset>标记混合使用,但是如果你要对不支持框架的浏览器提供一些信息,那么你需要将这些信息包装在<body></body>标记中,置于<noframes></noframes>标记内

三、HTML的<iframe>:

使用<iframe>标记可以将一个网页“嵌入”到另一个网页中,注意这种嵌入和“include”不同,下面我们通过一个例子来了解iframe的效果
<html>
<body>

<iframe src="default.asp"></iframe>

<p>Some older browsers don't support iframes.</p>
<p>If they don't, the iframe will not be visible.</p>

</body>
</html>

备注:

注意<iframe></iframe>标记是置于<body></body>内,这一点和<noframes></noframes>刚好相反

效果如下:

可以看到一个HTML页面被“嵌入”了当前HTML页面。

四、框架与锚标记:
<html>

<frameset cols="180,*">

<frame src="content.htm">
<frame src="link.htm" name="showframe">

</frameset>

</html>

在框架中使用锚标记和在普通网页重使用锚标记中没有两样,看看content.htm的内容:
<html>
<body>

<href ="link.htm" target ="showframe">Link without Anchor</a><br>
<href ="link.htm#C10" target ="showframe">Link with Anchor</a>

</body>
</html>

可以看到content.htm中第二个链接使用了锚标记指向link.htm的名为C10的锚处。


-------------------------------------------------------------
生活就像打牌,不是要抓一手好牌,而是要尽力打好一手烂牌。
posted on 2008-06-05 21:44 Paul Lin 阅读(506) 评论(0)  编辑  收藏 所属分类: Web基础

只有注册用户登录后才能发表评论。


网站导航:
 
<2008年6月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿(21)

随笔分类

随笔档案

BlogJava热点博客

好友博客

搜索

  •  

最新评论

阅读排行榜

评论排行榜