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

查看:41
本文介绍了用于“添加到主屏幕"的 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 的 window.external.AddFavorite(location.href, document.title); 可能吗?

Something similar to IE's window.external.AddFavorite(location.href, document.title); possibly?

推荐答案

在 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天全站免登陆