是否可以挂钩window.returnValue的更改? [英] Is it possible to hook the changing of window.returnValue ?

查看:67
本文介绍了是否可以挂钩window.returnValue的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以挂钩更改window.returnValue?


当用户关闭模态对话框或javascript window.close时,我需要获取window.returnValue ()调用。


 


页面将在window对象的onunload事件的事件处理程序中设置window.returnValue。


因为多个事件处理程序可以附加到onunload事件  window对象,如果我附加我的事件处理程序来获取window.returnValue,有时它什么也得不到,因为页面的事件处理程序还没有运行。


 

解决方案

请查看以下链接:


http://forums.asp.net/p/1139892/1831417.aspx


http://www.codingforums.com/showthread.php?t=37279


Is it possible to hook the changing of window.returnValue ?

I need to get the window.returnValue when the user close the modal dialog or a javascript window.close() calls.

 

the page will set the window.returnValue in a event handler of onunload event of window object.

Because more than one event handler can attach to the onunload event  of window object, If I attach my event handler to get the window.returnValue, sometimes it will get nothing because the page's event handler not run yet.

 

解决方案

please check these link:

http://forums.asp.net/p/1139892/1831417.aspx

http://www.codingforums.com/showthread.php?t=37279


这篇关于是否可以挂钩window.returnValue的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆