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

后端 未结 3 1126
感情败类
感情败类 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:32

    you can use the jquery unload function:

    $(window).unload(function() {
      alert('Handler for .unload() called.');
    });
    

提交回复
热议问题