框架(3)

框架
  <frameset> <!--框架标签-->
    <frame src="html的路径+名称”></frame> <!--引用html标签-->
  </frameset>

 eg: 

  <html>
    <head>
      <title>商业</title>
    </head>
    <frameset rows="15%,70%,*" border="5">
      <frame src="left.html"/>
      <frameset cols="30%,*">
        <frame src="left.html"/>
        <frame src="rigth.html"/ name="right"/>
      </frameset>
      <frame src="header.html"/>
    </frameset>
  </html>

刷新指定区域
  第一步:在指定的frame中指定name属性值(框架.html)
  第二步:在超链接部分指定targe的值为第一步的属性值(left.html)
内联框架(iframe)
  <iframe src="html路径+名称"frameborder="0/1" scrlling="yes/no" ></iframe>
  frameborder:0表示无边框,  1表示有边框
  scrlling:yes表示有滚动条,  no表示无滚动条

  eg:

  <html>
    <head>
      <title>iframe简单使用</title>
    </head>
    <body>
      <iframe src="subframe/the_one.html" width="400px" height="236px" frameborder="1" srcolling="no"/>
      <iframe src="subframe/the_second.html" width="400px" height="236px" srcolling="no"/>
    </body>
  </html>

刷新内联框架步骤
  第一步:在指定的iframe中指定name属性值(框架.html)
  第二步:在超链接部分指定targe的值为第一步的属性值(left.html)新内联框架步骤

框架<frame>的常用属性:frameborder(是否显示边框),name(框架标识符),scrolling(是否显示滚动条),noresize(是否允许调整框架窗口大小)

target属性的取值:_blank(在新窗口中打开链接),_self(在链接所在页面的自身窗口中打开链接),框架窗口名(在指定的框架窗口中打开链接),_parent(在父框架集中打开链接,如果不是框架网页,则含义同_self),_top(在顶级窗口中打开链接)

<franeset>框架结构非常清晰,适合于整个页面都用框架实现的场合;<iframe>内联框架使用比较方便、灵活,一般用于在页面中引用站外的页面内容时。

posted @ 2017-05-07 20:18  眼泪,还是流了  阅读(214)  评论(0编辑  收藏  举报