How would I raise an event (jQuery or vanilla Javascript) when a popup window is closed?

后端 未结 8 869
没有蜡笔的小新
没有蜡笔的小新 2021-02-13 18:06

I want to raise an event when a popup window is closed, or preferably, just before closing. I\'m storing the popup window object as an object, but I don\'t know of any way to bi

8条回答
  •  忘了有多久
    2021-02-13 19:02

    You'd have to have the onBeforeUnload event call a method to notify your handler.

    See this page for a demo.

    http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm

提交回复
热议问题