用于“添加到主屏幕”的Javascript在iPhone上? [英] Javascript for "Add to Home Screen" on iPhone?

查看:145
本文介绍了用于“添加到主屏幕”的Javascript在iPhone上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Javascript模拟Mobile Safari书签菜单中的添加到主屏幕选项?

Is it possible to use Javascript to emulate the Add to Home Screen option in Mobile Safari's bookmark menu?

类似于IE的窗口。 external.AddFavorite(location.href,document.title); 可能吗?

推荐答案

唯一的方法在MobileSafari中添加任何书签(包括主屏幕上的书签)都是内置的UI,并且Apples无法提供从页面内的脚本执行此操作。事实上,我很确定在桌面版Safari上没有这样做的机制。

The only way to add any book marks in MobileSafari (including ones on the home screen) is with the builtin UI, and that Apples does not provide anyway to do this from scripts within a page. In fact, I am pretty sure there is no mechanism for doing this on the desktop version of Safari either.

这篇关于用于“添加到主屏幕”的Javascript在iPhone上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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