问题描述
我试图在我的网络应用程序的Safari中禁用电话号码检测,但它仍然显示由数字组成的7个字符串作为电话号码。我使用了苹果公司提供的meta标签但没有欢乐。
I have tried to disable phone number detection in safari for my web app but it still shows 7 character strings comprised of numbers as phone numbers. I used the apple provided meta tag but no joy.
<meta name="format-detection" content="telephone=no">
其他人遇到此问题并解决此问题吗?
Anyone else run into this problem and work around it?
谢谢。
更新:看起来它没有检测到safari中的电话号码,而是当我将页面保存为图标并从中运行时主屏幕。
Update: It looks like it does not detect phone numbers in safari but rather when I save the page as an icon and run it from the home screen.
推荐答案
好的。经过相当多的充实,我觉得我找到了一个奇怪的工作。使用dataDetectorTypes的问题是它将禁用整个uiwebveiw的电话号码检测。
OK. After quite a bit of futzing I think I found a strange work around. The problem with using dataDetectorTypes is that it will disable phone number detection for the whole uiwebveiw.
在span和标签上尝试datadetectors =off和x-apple-data-detectors =false属性后,我终于偶然发现了一些似乎阻止手机的东西数字检测。
After trying datadetectors="off" and x-apple-data-detectors="false" attribute on span and a tags I finally stumbled on something that seems to prevent phone number detection.
如果我将文本包装在带有href =#的标签中,苹果似乎不管它。
If I wrap my text in an a tag with an href="#" apple seems to leave it alone.
这篇关于你如何在移动野生动物园中检测电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!