Is there a way to determine that the browser window was closed?

前端 未结 8 468
感动是毒
感动是毒 2021-01-14 12:35

How is it possible to identify that the browser\'s close button was clicked?

8条回答
  •  忘掉有多难
    2021-01-14 13:29

    I agree with northsouthwhat, but be aware that onbeforeunload may not be supported in all the browsers you might want to use it in.

提交回复
热议问题