在 iPhone、iPad 等设备上运行的 safari 中捕获浏览器关闭事件

发布于 2024-12-10 11:20:15 字数 109 浏览 1 评论 0原文

我如何在 iPhone、iPad、itouch 等设备上运行的 safari 中捕获浏览器关闭事件,因为 onbeforeunload 事件不适用于 safari?

非常感谢, 哈里普拉萨

How do i capture the browser closing event in safari running in iPhone ,iPad, itouch etc. as the onbeforeunload event will not work with safari?

Many thanks,
Hariprasath

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

饮湿 2024-12-17 11:20:15

iOS 版 Safari 支持 unload 事件,这应该可以解决问题。您可以在此处找到有关支持的 Safari for iOS 事件的更多信息:

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html

希望有所帮助。

Safari for iOS supports the unload event, which should do the trick. You can find out more information about supported Safari for iOS events here:

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文