急!急!急!高手帮忙.为什么我刷新父窗口时,本窗口最小化到状态栏.我想让它永远保持在上面.多谢了

giantman 2003-07-16 01:41:53
我在a.html用open('b.html',"",".....").打开b.html.然后我想在b.html里用window.opener.location.href = window.opener.location.href实现父窗口刷新而本窗口还是保持在上面.但本窗口最小化到了状态栏,a.html.显示在上面了.请高手帮忙解决一下.(我估计是焦点的问题,但没查出来)
...全文
114 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
形印声传 2003-07-20
  • 打赏
  • 举报
回复

sorry,modify it~~:

window.opener.href=window.opener.href;;---->改为window.opener.location.relload();
形印声传 2003-07-20
  • 打赏
  • 举报
回复
b窗口:
<html>
<head><title>1.htm</title></head>
<body onblur="this.focus()">
<script>
function re(){

window.opener.href=window.opener.href;;


}
</script>
<input type=button onclick=re() value="refresh opener">
</body>
</html>
BigTreeForShadow 2003-07-19
  • 打赏
  • 举报
回复
window.opener.location.href = window.opener.location.href
改成
window.opener.location.reload();
inanition 2003-07-19
  • 打赏
  • 举报
回复
假如以上的方法还不行,试试下面的:

在a.html文件中的加入
<script language=javascript>
<!--
function window_onload() {
 if (b窗口存在) {
 b窗口.focus();
 }
}
//-->
</script>
<body onload="return window_onload();">

这样可能会闪一下。
zhangguagua 2003-07-19
  • 打赏
  • 举报
回复
<body onblur="this.focus()">
kingdomzhf 2003-07-19
  • 打赏
  • 举报
回复
up
leaxin 2003-07-19
  • 打赏
  • 举报
回复
你在 window.opener.location.href=.....
后面再加一句window.focus()呢?
不行的话,你用 window.showModelessDialog("b.html")打开b.html吧

87,997

社区成员

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

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