防止在JqueryMobile上识别电话号码

时间:2011-06-04 19:59:14

标签: iphone uiwebview jquery-mobile

我使用Jquery Mobile遇到此问题。问题是我的标签上显示的日期值为“12/6/1999”。现在JQuery Mobile将其转换为链接,因为它被识别为电话号码。我不太确定是不是那个或那个iPhone的jquery。

所以,我的第一个方法是我正在寻找一种方法来阻止jquery mobile识别电话号码。有办法吗?

如果它是iPhone,它有没有办法可以禁用它?

非常感谢您的帮助。

4 个答案:

答案 0 :(得分:2)

你可以尝试

<meta name = "format-detection" content = "telephone=no">

这将告诉safari不检测电话号码。

有关http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html

的更多信息

答案 1 :(得分:1)

你可以分两种方式做到这一点。

HTML停用

<p datadetectors="off">Header text with number 9123 3456</p> 
<p>Body text with number 9872 4567</p>
在您的uiwebview上

全球

webview.dataDetectorTypes=0;

答案 2 :(得分:0)

输入元素类型设置为什么?确保它已设置为日期。

示例:

<label for="date">Date Input:</label>
<input type="date" name="date" id="date" value=""  />

文档:

答案 3 :(得分:0)

我做的是这样的。将日期设为href而没有链接。

<a href="#" class="unlink">2012-08-23/a>

然后应用CSS将链接修改为看起来像文本。

.unlink {
    text-decoration: none;
    color: #333;
    cursor: text;
}
相关问题