Trying to detect browser close event

后端 未结 11 597
广开言路
广开言路 2020-11-22 05:56

I have tried many methods to detect browser close event through jQuery or JavaScript. But, unfortunately, I have not been able to detect the close. The onbeforeunload<

11条回答
  •  盖世英雄少女心
    2020-11-22 06:33

    Maybe it's better to use the path detecting mouse.

    In BrowserClosureNotice you have a demo example and pure javascript library to do it.

    It isn't perfect, but avoid problems of document or mouse events...

提交回复
热议问题