散列键“#”从“tel:”中的ussd代码剥离。链接在html页面上 [英] hash key "#" stripped from ussd code in "tel:" links on html pages

查看:168
本文介绍了散列键“#”从“tel:”中的ussd代码剥离。链接在html页面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

祝你一切顺利。
我在网页上有一个简单的链接,用户可以在其中调用USSD号码:

 < a href =tel:* 111 * 2#class =phoneCallButtonLink> *点击此处并打电话* 111 * 2#< / a> 

这非常简单;现在,如果我在桌面浏览器上测试它,它会弹出一个警告,询问我是否打电话给(使用Skype)号码 * 111 * 2#,那就好了。



用我的Android手机(S Note 3),当测试这个页面时,手机(或其他)从最后一个#链接,致使 * 111 * 2



有人经历过这种情况吗?或知道如何防止这种情况发生?


Good day all. I have a simple link on a webpage, in where the user can call an USSD number:

<a href="tel:*111*2#" class="phoneCallButtonLink">*CLICK HERE AND CALL *111*2#</a>

this is pretty straight forward; now, if I test it on desktop browser, it popups an alert asking me if I want to call (with skype) the number *111*2#, and thats ok.

with my Android phone (S Note 3), when testing this page, the phone (or something) stripped out the last "#" (only the last) from the link, resulting in a call to *111*2.

does anyone has experienced this? or knows how to prevent this?

解决方案

Use URL encoding for special character in a URL. For example # equals %23

This worked for me:

<a ng-href="tel:%23 224">#224</a>

As you can see:

这篇关于散列键“#”从“tel:”中的ussd代码剥离。链接在html页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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