海棠湾哪家酒店好:DreamWeaver中的框架如何实现点给左边的框架链接右边显示内容?

来源:百度文库 编辑:高考问答 时间:2024/04/29 21:31:13

在链接的"目标"选择右边框架的名称,当然你必须先给右边框架命名,如果不命名的话默认名称好象是"Right",记不清了,你试试吧

<html>
<frameset cols="120,*">
  <frame src="/example/html/html_contents.html">
  <frame src="/example/html/frame_a.html" name="showframe">
</frameset>
</html>

显示效果:

框架页面 index.html

<html>
<frameset cols="120,*">
    <frame src="menu.html">
    <frame src="p1.html" name="show">
    <!--指定被更改的页面的name值-->
</frameset>
</html>

菜单页面 menu.html

<html>
<body>
    menu<br>
    <a href="p1.html" target="show">p1</a><br>
    <!--在菜单页面的超链接必须指定target属性为框架中相同name值-->
    <a href="p2.html" target="show">p2</a>
</body>
</html>

页面1 p1.html

<html>
<body>
    p1
</body>
</html>

页面2 p2.html

<html>
<body>
    p2
</body>
</html>