這個和 PHP 無關, 是 Html 的 frame 可以實現 ..
如下 :
main.html
<html>
<head>
</head>
<frameset id="frm" cols="160,*" frameborder="0" framespacing="0">
<frame name="contents" target="admin" src="left.htm" scrolling="auto">
<frame name="rightPage" src="right.html">
<noframes>
<body>
<p>This page use frame ,but your browser dosn't support .</p>
</body>
</noframes>
</frameset>
</html>a.html
<html>
<head>
</head>
<body>
<a href='right2.html' target='rightPage'> open right page on rightPage </a>
</body>
</html>right2.html
<html>
Any thing
</html>
如下 :
main.html
<html>
<head>
</head>
<frameset id="frm" cols="160,*" frameborder="0" framespacing="0">
<frame name="contents" target="admin" src="left.htm" scrolling="auto">
<frame name="rightPage" src="right.html">
<noframes>
<body>
<p>This page use frame ,but your browser dosn't support .</p>
</body>
</noframes>
</frameset>
</html>a.html
<html>
<head>
</head>
<body>
<a href='right2.html' target='rightPage'> open right page on rightPage </a>
</body>
</html>right2.html
<html>
Any thing
</html>
一般用<base target="right_frame_name">统一指定,免去到处都有
2、使用onClick事件时,可用top.right_frame_name.location=url