有没有办法将 REFRESH 之前弹出的窗口关闭? <body OnbeforeunLoad="DesignerWizWin.close()"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不行……我再说一下 我是在 2 秒后指向的http://51st.51.net/nuke/index.htm网页内想将前面弹出的窗口 DesignerWizWin 去掉楼上的方法试过了 出错说DesignerWizWin没定义我在本机上试时 没出错 但也没用 try<html> <head> <title>URL</title> <META HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312"> <META HTTP-EQUIV="REFRESH" CONTENT="2; URL=http://51st.51.net/nuke/index.htm"> <script language="javascript">var DesignerWizWin;</script></head> <body Onload="DesignerWizWin=window.open('http://mydns.chinadns.com/popup.htm', 'popup', 'toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=0, width=433, height=195, left=200, top=200');" Onbeforeunload="if (!DesignerWizWin.closed) DesignerWizWin.close()"> </body> </html> 一点REFRESH,窗口实际上是个新窗口了,原窗口中的一切对象,包括DesignerWizWin,都无法引用了可以用setTimeout()代替META实现REFRESH,在刷新之前先关闭DesignerWizWinsetTimeout(2000,"closeDesignerWizWin();");function DesignerWizWin(){if(this.DesignerWizWin //确保DesignerWizWin对象存在&& !DesignerWizWin.closed)DesignerWizWin.close();} 上面忘了刷新窗口了setTimeout(2000,"refresh_and_close();");function refresh_and_close(){this.location.reload(); //刷新当前窗口this.locatoin.url = "http://51st.51.net/nuke/index.htm"; //刷新当前窗口的另一种办法if(this.DesignerWizWin //确保DesignerWizWin对象存在&& !DesignerWizWin.closed) //未关闭DesignerWizWin.close(); //则关闭} 反了,应该先关闭再刷新setTimeout(2000,"refresh_and_close();");function refresh_and_close(){if(this.DesignerWizWin //确保DesignerWizWin对象存在&& !DesignerWizWin.closed) //未关闭DesignerWizWin.close(); //则关闭this.location.reload(); //刷新当前窗口this.locatoin.url = "http://51st.51.net/nuke/index.htm"; //刷新当前窗口的另一种办法} 看来没办法了啦因为我根本就没有操作第一页的权利我只能操作http://51st.51.net/nuke/index.htm js改变样式 [分享]js歌词同步显示改进版 JS如何设置按钮的边框颜色 [求助] ExtJs问题,Ext.FormPanel中删除一个Item,整个对象都无效了。 关于网页加密的问题 二叉树搜索怎么做 已经有一个二叉树.想在上面实现搜索节点上的文字怎么做. 高难问题,至今没有找到答案. ajax读取XML时IE是不是有缓存的? 动态修改控件名称,然后取值问题 兄弟们,告诉我,怎样把一个"11111"String型的js参数转换成为一个long型! 如何才能去掉关闭窗口的确认框? frame load次序
我在本机上试时 没出错 但也没用
<head>
<title>URL</title>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=http://51st.51.net/nuke/index.htm">
<script language="javascript">
var DesignerWizWin;
</script>
</head>
<body Onload="DesignerWizWin=window.open('http://mydns.chinadns.com/popup.htm', 'popup', 'toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=0, width=433, height=195, left=200, top=200');" Onbeforeunload="if (!DesignerWizWin.closed) DesignerWizWin.close()">
</body>
</html>
{
if(this.DesignerWizWin //确保DesignerWizWin对象存在
&& !DesignerWizWin.closed)
DesignerWizWin.close();
}
function refresh_and_close()
{
this.location.reload(); //刷新当前窗口
this.locatoin.url = "http://51st.51.net/nuke/index.htm"; //刷新当前窗口的另一种办法if(this.DesignerWizWin //确保DesignerWizWin对象存在
&& !DesignerWizWin.closed) //未关闭
DesignerWizWin.close(); //则关闭
}
function refresh_and_close()
{
if(this.DesignerWizWin //确保DesignerWizWin对象存在
&& !DesignerWizWin.closed) //未关闭
DesignerWizWin.close(); //则关闭this.location.reload(); //刷新当前窗口
this.locatoin.url = "http://51st.51.net/nuke/index.htm"; //刷新当前窗口的另一种办法
}