帮解决一点小问题frame的应用!

卟惹尘埃 2010-11-22 09:41:06
先看看我写的
---------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
</head>
<frameset rows="59,*" frameborder="no" border="0" framespacing="0">
<frame src="head.html" noresize="noresize" frameborder="0"

name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frame src="left.html" noresize="noresize" frameborder="0" name="topFrame"

marginwidth="0" marginheight="0" scrolling="no">
<frameset rows="*" cols="195,*" id="frame">
<frame src="right.html" name="main" marginwidth="0" marginheight="0"

frameborder="0" scrolling="yes">
</frameset>
<frame src="UntitledFrame-1" noresize="noresize" frameborder="0"

name="bottomFrame" marginwidth="0" marginheight="0" scrolling="no">
<noframes>
<body></body>
</noframes>
</frameset>
</html>
-------------------------------------------
head.html
-------------------------------------------
<a href="#" onClick="switchBar(this)">1111</a>
2222
3333<a href="right1.html" target="main">111</a>
<a class="top_link" href="right2.html" target="main">222</a>
-------------------------------------------
left.html
-------------------------------------------
<body>
<div id="left">sad</div>
</body>
-------------------------------------------
right.html
-------------------------------------------
<body>
<div id="right">sad</div>
</body>

===================
我想点击head.html的按钮然后让righ.html页面变化 但是为啥不再本页打开,而另开了一个新页面?我想左边个上边部分不变,只变右边部分,怎么解决啊?
...全文
67 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
licip 2010-11-23
  • 打赏
  • 举报
回复
是要是在a标签的里面加一个:target="main"
p892355890 2010-11-23
  • 打赏
  • 举报
回复
<frame src="right.html" name="main"
//把right的name设为 main 然后连接页面的时候<a href="#" tager="main"></a>就OK 了
卟惹尘埃 2010-11-23
  • 打赏
  • 举报
回复
卟惹尘埃 2010-11-22
  • 打赏
  • 举报
回复
我是说为什么一定会在右边打开?
TaoFor 2010-11-22
  • 打赏
  • 举报
回复
在你的按钮里写点东西就好了.

连接的话,就加上 tager="main"
没有的话,就拼接个<a>
卟惹尘埃 2010-11-22
  • 打赏
  • 举报
回复
毅哥 麻烦注释一下 哪里在起作用?
hookee 2010-11-22
  • 打赏
  • 举报
回复

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
</head>
<frameset rows="59,*" frameborder="no" border="0" framespacing="0">
<frame src="head.html" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frameset cols="195,*" id="frame">
<frame src="left.html" noresize="noresize" frameborder="0" name="leftFrame" marginwidth="0" marginheight="0" scrolling="no">
<frame src="right.html" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes">
</frameset>
<noframes>
<body></body>
</noframes>
</frameset>
</html>
卟惹尘埃 2010-11-22
  • 打赏
  • 举报
回复
怎么没人啊 自己先顶下

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧