搜索 | 用户支持

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

Learn More

Is there any close event of firefox browser ?

  • 1 个回答
  • 1 人有此问题
  • 3 次查看
  • 最后回复者为 user293

more options

I want to capture the event that fire when I close the browser.

Is there any way to capture event using JavaScript/JQuery?

Thanks

I want to capture the event that fire when I close the browser. Is there any way to capture event using JavaScript/JQuery? Thanks

由ajeetyadav89于修改

所有回复 (1)

more options

I guess I'm kind of confused. Are you developing a webpage or a firefox add-on (although the jquery part makes me think you are making a webpage)?

There isn't any way to detect when the application quits, since all javascript stops running once the webpage is closed. However, you can detect when the webpage is about to be left, either from the application closing, the tab being closed, or the user going to a different page using the onbeforeunload event.

(also, this works in all browsers, not just firefox).