![](/img/trans.png)
[英]If I don't have a Bluetooth LE device am I just out of luck with trying to write a program?
[英]Don't want telephone link to call out in brwsers just phones
我正在使用,因为我在页面上还有其他不是电话号码的号码,不希望它们被检测到。 我将数字包装在一个链接中,但我不希望它在浏览器中可点击,只能在设备上点击。
这实际上很简单, Apple 的文档对其进行了非常彻底的描述——
// Disable automatic telephone number detection
<meta name = "format-detection" content = "telephone=no">
// Explicitly mark a number as a telephone number
<p>A phone number: <a href="tel:1-408-555-5555">1-408-555-5555</a></p>
为了防止链接在桌面浏览器上单击时执行任何操作,您可以进行一些浏览器嗅探...
$('a.someClass').click(function(e) {
if (!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) {
e.preventDefault();
}
});
但是,在使用 Skype 等 VOIP 等软件司空见惯的时代,您为什么要在桌面浏览器中削弱此功能? 有关为什么浏览器嗅探是个坏主意的精彩讨论,请参阅此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.