简体   繁体   English

如何在我的移动网站上添加“添加收藏夹”链接?

[英]How do I add an “Add Favorite” link to my mobile site?

I'm building a mobile site and the client wants users to be able to click a link on the site that adds a link to the site to the user's home screen on their phone. 我正在构建一个移动网站,客户端希望用户能够单击该网站上的链接,从而将该网站的链接添加到用户手机上的主屏幕。

Is this possible? 这可能吗?

Yes. 是。 It is possible. 有可能的。 Many browsers allow this functionality. 许多浏览器都允许此功能。

You need to use the Browser's API to add that link to the user's home screen. 您需要使用浏览器的API将该链接添加到用户的主屏幕。 Otherwise using the HTML or JS it is not possible. 否则,将无法使用HTML或JS。

I hope you're talking the way Chrome adds a hyperlink to the screen, then you need to learn how the browser does so. 我希望您正在谈论Chrome在屏幕上添加超链接的方式,然后您需要了解浏览器的操作方式。 For that please read the dev documentations. 为此,请阅读开发文档。 Their is no such option in HTML, you need to learn the OS dev docs and as well as Browser documentation. 在HTML中,它们不是这样的选择,您需要学习OS开发文档和浏览器文档。

Google Chrome: 谷歌浏览器:

https://developers.google.com/chrome/mobile/docs/installtohomescreen https://developers.google.com/chrome/mobile/docs/installtohomescreen

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM