How can I run javascript code only when page is fully unloaded?

前端 未结 0 1426
温柔的废话
温柔的废话 2021-01-18 02:40

I want to be able to run a certain piece of code ONLY when the page is exited. I have tried this:

window.onbeforeunload = function(){
    new Notification(\'W         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题