Browser/tab close detection using javascript (or any other language)

后端 未结 3 1124
感情败类
感情败类 2020-12-10 23:00

I searched for this question in various places, but all that they mention is the use of javascript window.unload & window.onbeforeunload. Also it doesn\'t

3条回答
  •  鱼传尺愫
    2020-12-10 23:42

    I tested and the example posted on MDN works clearly in Chrome.

    
    

    ...

       
    ...

    This way a dialog opens that will not be blocked by a popup blocker as it is originated from a user click.

提交回复
热议问题