浏览器是IE7的。
由父页面 打开 子页面。
出现的问题是:如果把父页面 关闭了,再关闭子页面(或者全部同时关闭)在子页面里的 JS-->
function window.onunload ()
{
if (this.window.opener !=null && this.window.opener !="")
{
this.window.opener.m_iCurPage =1;
this.window.opener.GetDataAndFillTable(1);
this.window.opener.DisplayPageInfo();
}
}
在红色的位置报异常。m_iCurPage 是父页面的JS的一个参数,GetDataAndFillTable是一个方法。
为什么父页面关闭了 而子页面的 this.window.opener 不是空的啊?
请高手解决一下!!
由父页面 打开 子页面。
出现的问题是:如果把父页面 关闭了,再关闭子页面(或者全部同时关闭)在子页面里的 JS-->
function window.onunload ()
{
if (this.window.opener !=null && this.window.opener !="")
{
this.window.opener.m_iCurPage =1;
this.window.opener.GetDataAndFillTable(1);
this.window.opener.DisplayPageInfo();
}
}
在红色的位置报异常。m_iCurPage 是父页面的JS的一个参数,GetDataAndFillTable是一个方法。
为什么父页面关闭了 而子页面的 this.window.opener 不是空的啊?
请高手解决一下!!
解决方案 »
- asp.net LinkButton1_Click 事件
- 引用jquery.js后,vs2010调试自动跳出
- 新手问个简单的DataTable问题~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 访问网页报错:Access is denied??????????在线等待!!!!!!!!!!
- 求助 数据库插记录的问题
- 日期的格式化显示
- 请问如何实现在csdn bbs的那个通知连接的功能?
- 哪位朋友能帮忙找个ASP.Net中的选择颜色的控件?
- 怎样实现无刷新聊天室?
- 程序中用了treeview控件,安装程序该怎么做?
- div高度问题
- IE 6 , 7 中如何限制DIV的最大高度?
比如A页面利用window.open弹出了B页面窗口,那么A页面所在窗口就是B页面的
opener,在B页面通过opener对象可以访问A页面
应该用parent对象来访问父窗体的对象吧
parent对象是同一个窗体
如果你想关闭子窗口时向父窗口传递值,建议换一种方法,只把m_iCurPage 的值传回去,方法GetDataAndFillTable(1)、DisplayPageInfo()还是放到页面一去执行吧。
m_iCurPage 没地方传了啊?
父页面关闭了!
{
}这样看看
或者加一下try catch
异常处理用哪个语言编程都是必要的