HTML <frameset> 标签(分帧)

定义和用法

frameset 元素可定义一个框架集。它被用来组织多个窗口(框架)。每个框架存有独立的文档。在其最简单的应用中,frameset 元素仅仅会规定在框架集中存在多少列或多少行。您必须使用 cols 或 rows 属性。

实例

简单的三框架页面:

<html>

<frameset cols="25%,50%,25%">
  <frame src="frame_a.htm" />
  <frame src="frame_b.htm" />
  <frame src="frame_c.htm" />
</frameset>

</html>

 重要事项:您不能与 <frameset></frameset> 标签一起使用 <body></body> 标签。不过,如果您需要为不支持框架的浏览器添加一个 <noframes> 标签,请务必将此标签放置在 <body></body> 标签中!

如index.html中使用分帧:

<html>
	<head>
		<meta http-equiv="content-type" content="text/html,charset=utf-8">
		<title>首页</title>
	</head>
	<frameset rows="20%,*">

		<frame src="__URL__/top" name='top'">

		<frameset cols="60%,40%">
			<frame src="__URL__/left" name='left'">
			<frame src="__URL__/right" name='right'">
		</frameset>

	</frameset>

</html>

 IndexAction.class.php:

class IndexAction extends Action {
    public function index(){
		$this->display();
        }
    	public function top(){
		$this->display();
	}
	public function left(){
		$this->display();
	}
	public function right(){
		$this->display();
	}    

 在TPL/Index目录下建立相应html即可

原文地址:https://www.cnblogs.com/Hebe/p/3051735.html