是否可以挂钩window.returnValue的更改? [英] Is it possible to hook the changing of 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
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:
这篇关于是否可以挂钩window.returnValue的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!