添加到主屏幕上的手机 [英] Add to homescreen on mobile phone
问题描述
我怎样才能codeA按钮进行特别是在iPhone和Android手机的快捷方式。
How can I code a button to make a shortcut for mobile phone especially on iPhone and Android.
我用样板作为一个框架,所以它会自动在头部&LT添加此,链接相对=快捷方式图标的href =IMG / L /苹果触摸图标。 PNG>
。我认为这将是使用我的默认图标。
I'm using boilerplate as a framework so it would automatically be adding this on the head section <link rel="shortcut icon" href="img/l/apple-touch-icon.png">
. I think this would be my default icon to be used.
现在我在我的HTML的按钮是设置这样的
now I have a button in my html that is setup like this
<a href="#"><img src="img/button-shortcut.jpg" /></a>
我不知道把我的的href
什么,或者我应该实现它使用JavaScript。我也不知道什么是正确的术语,我只是猜测这就是所谓的捷径
I'm not sure what to put in my href
or should I implement it using javascript. I'm also not sure what is the proper term, I'm just guessing it's called as a "shortcut"
什么是我想要实现的是,我有一个简单的Web应用程序(普通HTML),我有一个按钮来添加自己的主屏幕上的快捷方式/图标。这样更容易让他们访问我的网站/ web应用程序。我的目标设备是iPhone和Android为主。
What' I'm trying to achieve is, I have a simple web app (plain html) and I have a button to add a shortcut/icon on their homescreen. That way it's easier for them to access my website/web app. My target devices are iphone and android primarily.
有人可以告诉我吗?
谢谢!
推荐答案
您不能建立一个快捷方式链接,在iOS上这个功能,我不知道在Android的方式无论是。 iOS用户必须使用Safari浏览器工具栏上的东西添加到主屏幕。
You can't make a shortcut link for this functionality on iOS, and I'm not aware of a way on Android either. iOS users have to use the Safari toolbar to add something to the home screen.
有些网站使用JavaScript来present用户用少许弹出,像这样的:
Some sites use JavaScript to present the user with a little popup, like this:
这篇关于添加到主屏幕上的手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!