点击手机网页中的链接时如何触发电话 [英] How to trigger a phone call when clicking a link in a web page on mobile phone

查看:177
本文介绍了点击手机网页中的链接时如何触发电话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为移动设备构建一个网页。只有一件事我还没弄明白:如何通过点击文字来触发电话?



是否有一个特殊的URL可以输入 mailto:电子邮件标记?



设备特定的解决方案不是首选。

我知道iPhone会自动识别电话号码,并为此创建一个链接,但如果可以对图片进行此操作,并且也适用于大多数移动设备,该功能将非常棒。

$ b $大多数现代设备都支持tel:方案。因此,请使用< a href =tel:555-555-5555> 555-555-5555< / a> p>

如果您想将它用于图片,< a> 标签可以处理< img /> 与其他正常情况一样:< a href =tel:555-555-5555>< img src =path / to / phone / icon.jpg/>< / a>


I need to build a web page for mobile devices. There's only one thing I still haven't figured out: how can I trigger a phone call through the click of text?

Is there a special URL I could enter like the mailto: tag for emails?

Device specific solution are not preferred.

I know iPhone automatically recognizes phone numbers and creates a link for this, but it would be great if this could be done for images too... and also for most mobile devices.

解决方案

Most modern devices support the tel: scheme. So use <a href="tel:555-555-5555">555-555-5555</a> and you should be good to go.

If you want to use it for an image, the <a> tag can handle the <img/> placed in it just like other normal situations with : <a href="tel:555-555-5555"><img src="path/to/phone/icon.jpg" /></a>

这篇关于点击手机网页中的链接时如何触发电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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