gpt4 book ai didi

javascript - Whatsapp 链接打不开 Whatsapp 应用程序

转载 作者:行者123 更新时间:2023-12-02 16:06:08 33 4
gpt4 key购买 nike

我在此网站页脚中使用共享按钮。除了 url http://gnr.richkid.co.il/he/catalog/a/item/?ItemID=etc 的页面之外,whatsapp 按钮在所有页面中都可以正常工作。 ......

如果您将 Chrome 中的用户代理更改为 iPhone、Galaxy 等移动设备,您可以在页脚中看到按钮。

只是不要打开whatsapp。

a href 代码:

<li>
<a class="wa_btn wa_btn_l" href="whatsapp://send?text=גלשתי באתר הגלריה - בית לאירועים באזור השרון: http://gnr.richkid.co.il/he/catalog/a/item/Default.aspx?ItemID=268" data-text="share" data-href="http://gnr.richkid.co.il/he/catalog/a/item/Default.aspx?ItemID=268" target="_top">
<i class="fa fa-whatsapp fa-2x"></i>
</a>
</li>

有什么问题吗?我应该修复什么?

非常感谢,利隆。

最佳答案

在 href 中使用字符串之前,您没有对其进行编码。

看看我的教程 http://madole.github.io/blog/2015/06/18/mobile-browser-sharing-to-whatsapp-native-app/

基本上,在将字符串放入 href 之前,请先对字符串使用encodeURIComponent()。

关于javascript - Whatsapp 链接打不开 Whatsapp 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30712859/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com