防止电话号码在 Opera Mobile 上转换为链接

发布于 2024-10-06 01:23:43 字数 604 浏览 0 评论 0原文

显然,Opera 的那些人在他们的移动版本浏览器中添加了一个很好的功能:他们将类似电话号码的内容转换为网页上的 HTML 链接(例如 15.50 美元,这显然不是电话号码)。

该功能的描述如下:http://my.opera.com/operamobile/blog/2010/02/12/opera-mobile-10-beta-3-for-both-symbian-s60-and -windows-mobile

可以使用专有的 META 标记或类似的东西在 HTML 中抑制它吗?它真的搞砸了我们的应用程序...其他移动浏览器也有这样的功能,我应该注意吗?

编辑:感谢您向我提供指示 标记的问题的链接。这似乎可以解决 iPhone 上的问题,但不能解决 Opera Mobile 上的问题

Apparently, those guys at Opera have added a nice feature to their mobile version of the browser: They convert things looking like phone numbers into HTML links on webpages (e.g. USD 15.50, which clearly isn't a phone number).

The feature is described here: http://my.opera.com/operamobile/blog/2010/02/12/opera-mobile-10-beta-3-for-both-symbian-s60-and-windows-mobile

Can that be suppressed in HTML using a proprietary META tag or something like that? It really screws up our application... Do other mobile browsers also have such a feature that I should be aware of?

EDIT: Thanks for providing me with the link to the questions indicating the <meta name="format-detection" content="telephone=no"> tag. That appears to solve the problem on the iPhone, but not on Opera Mobile

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

此岸叶落 2024-10-13 01:23:43

一个蹩脚的解决方案:

使用 Javascript 删除任何带有 href="tel:..." 的链接。

A lame solution:

Use Javascript to remove any links with href="tel:...".

执着的年纪 2024-10-13 01:23:43

经过一番尝试和错误后,这似乎在 Opera Mobile 和 Mobilizer 上有效:

HTML 文本(实际上应该是“Samsung MSC 13800 TEU”)

Samsung MSC 13,800 TEU

(在逗号周围放置一个包含“隐藏”类的 span 标签)

CSS

span.hide {
显示:无;
逗号

是“13800 TEU”内的一个捏造的东西,对于辅助技术用户(那些有屏幕阅读器的用户)来说可能非常烦人,但我遵循 80-20 原则(有视力障碍的用户会比有视力障碍的用户更多;-)

After some trial and error this seems to work in Opera Mobile and on Mobilizer:

The HTML text (really should be "Samsung MSC 13800 TEU")

Samsung MSC 13,800 TEU

(put a span tag around the comma with a class of "hide")

The CSS

span.hide {
display:none;
}

The comma is a fudge within "13800 TEU" and probably very annoying for assistive technology users (those with screen readers) but I follow that 80-20 principle (there would be more confused sighted users than those with a vision impairment ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文