html复习三

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://hanchaohan.blog.51cto.com/2996417/927271

1.框架的基本概念:http://www.w3school.com.cn/

 

2.框架的基本结构:

 

注意事项:1.★框架网页是没有body的!!!!

 

  1. <html>
  2. <head>
  3. <metahttp-equiv="Content-Type"content="text/html;charset=GBK"/>
  4. <title>框架网页-cols</title>
  5. </head>
  6. <framesetrows="80,*"border="5">
  7. <framename="top"src="top.html"/>
  8. <framesetcols="400,*">
  9. <framename="left"src="http://www.baidu.com"/>
  10. <framename="right"src="http://www.google.com.hk"/>
  11. </frameset>
  12. </frameset>
  13. </html>

注意事项:★如果你想让框架网页之间的边框消失,要在frame标签中加上frameborder="0"这个属性!!

 

★如果你不想框架网页之间的边框可以被随意拖动,那么你需要再frame标签中加上noresize="noresize"这个属性!

 

eg.

  1. <html>
  2. <head>
  3. <metahttp-equiv="Content-Type"content="text/html;charset=GBK"/>
  4. <title>框架网页-cols</title>
  5. </head>
  6. <framesetrows="80,*"border="5">
  7. <framename="top"src="http://www.sina.com"frameborder="0"/>
  8. <framesetcols="400,*">
  9. <framename="left"src="http://www.baidu.com"frameborder="0"/>
  10. <framename="right"src="http://www.w3school.com.cn/"frameborder="0"noresize="noresize"/>
  11. </frameset>
  12. </frameset>
  13. </html>

3.框架网页中的超链接:

 

target="blank" → 新窗口

 

target="parent" → 父窗口

 

target="right" → 去框架中的某个name="right"的窗口。当然,还可以有left,top等。

 

3.当你想在普通网页中引入其他的网页时,可以用iframe这个标签!

用法:

 

  1. <htmlxmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <metahttp-equiv="Content-Type"content="text/html;charset=GBK"/>
  4. <title>iframe</title>
  5. </head>
  6. <body>
  7. <iframesrc="http://www.baidu.com"frameborder="2"width="200"height="200"scrolling="no"/>
  8. </html>

它的一些属性:

 

 

 

本文出自 “我的JAVA世界” 博客,请务必保留此出处http://hanchaohan.blog.51cto.com/2996417/927271

posted @ 2012-08-19 12:30  小薇林  阅读(211)  评论(0编辑  收藏  举报