在iPhone,iPad等中运行的野生动物园中捕获浏览器关闭事件 [英] Catch browser closing event in safari running in iPhone, iPad etc

查看:98
本文介绍了在iPhone,iPad等中运行的野生动物园中捕获浏览器关闭事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于onbeforeunload事件不适用于safari,我如何捕获在iP​​hone,iPad,iouch等运行的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?

非常感谢, 竖琴

推荐答案

iOS版Safari浏览器支持 unload 事件,该问题可以解决.您可以在此处找到有关受支持的Safari for iOS事件的更多信息:

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

希望有帮助.

这篇关于在iPhone,iPad等中运行的野生动物园中捕获浏览器关闭事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆