// 监听页面刷新/关闭事件
window.addEventListener('beforeunload', function (event) {
// 在页面刷新/关闭时向后端发送消息
....
})
08-11
1687
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-01
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交