搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

how to detect mozilla firefox window close using javascript

  • 1 个回答
  • 29 人有此问题
  • 16 次查看
  • 最后回复者为 Svetlana

more options

how can i call javascript function when close the browser window? I mean which event is triggered when closing the window..

how can i call javascript function when close the browser window? I mean which event is triggered when closing the window..

所有回复 (1)

more options
  • unload

This event is sent to a window when the window has closed. This is done after the close event. You should place this event handler on the window element. attribute: onunload

  • close

This event is sent when a request has been made to close the window when the user presses the close button. If you place an event handler on the window element, you can trap the window close. If you return false from the close handler, the window will not close. Return true to have it close normally. Note that this event is only fired when the user presses the close button on the titlebar; use the unload event to capture all attempts to unload the window. attribute: onclose

https://developer.mozilla.org/en/XUL/Events