frameset 中定位另一部分窗口

languagec 2007-02-09 05:07:34
主窗口分成上下两个部分,first和 second。
当我刷新first中的页面时,我想顺便也打开second中的页面(用特定的网页)
该怎么做?

我在first中的网页上用window.open 打开一个网页,我想把它在second中打开。
可是window.open 没有 target 的属性。 该怎么办?

有什么其它的办法?
...全文
271 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
BoyHaXin 2007-02-10
  • 打赏
  • 举报
回复
接分
Mapleleaf123 2007-02-10
  • 打赏
  • 举报
回复
后来者接分
hailun 2007-02-10
  • 打赏
  • 举报
回复
我也想知道这个,楼上的我已经测试了,不错呀

谢谢
不过想知道
parent.frames[1].location="http://www.google.cn" //这个是什么意思呢
window.location.href = window.location.href //是不是多余呢,什么作用呢
孟子E章 2007-02-10
  • 打赏
  • 举报
回复
<frameset rows="100,*">
<frame src="first.htm">
<frame src="second.htm">
</frameset>

first.htm
<body onload="document.all.x.innerHTML = (new Date()).toLocaleTimeString()">
<input type=button value=刷新 onclick="Setnew()">
<div id=x></div>
<script>
function Setnew()
{
parent.frames[1].location="http://www.google.cn"
window.location.href = window.location.href
}
</script>
孟子E章 2007-02-10
  • 打赏
  • 举报
回复
parent.frames[1].location="a.asp"
或者

parent.frames["secondFrameName"].location="a.asp"
或者
window.open ("a.asp","secondFrameName")

后面2种适合有<frame name="secondFrameName" src="">d的情况
stou 2007-02-10
  • 打赏
  • 举报
回复
不要用彈出窗口就可以了.
李睿_Lee 2007-02-09
  • 打赏
  • 举报
回复
感觉楼上的没有解决楼主的第一个问题。
yalan 2007-02-09
  • 打赏
  • 举报
回复
搞定给分,我建了7个页面给你测试通过了呵呵

对了,第一个问题的记得在前面都加上window.,也就是
window.parent.first.location.reload();
window.parent.second.location.href='你要打开的页面';


刚才忘了加window.
yalan 2007-02-09
  • 打赏
  • 举报
回复
主窗口分成上下两个部分,first和 second。
当我刷新first中的页面时,我想顺便也打开second中的页面(用特定的网页)
该怎么做?
parent.first.location.reload();
parent.second.location.href='你要打开的页面';
或者你也可以指定a href的target属性,这是最常用的方法。


我在first中的网页上用window.open 打开一个网页,我想把它在second中打开。
可是window.open 没有 target 的属性。 该怎么办?
这个市什么意思?不明白
不过你可以用这个:
<a href="#" onclick="window.opener.parent.second.location.href='你要打开的页面'">你要打开的页面的连接</a>

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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