如何创建超链接在移动设备上拨打电话号码? [英] How to create hyperlink to call phone number on mobile devices?

查看:651
本文介绍了如何创建超链接在移动设备上拨打电话号码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

带破折号的地区代码

$

b
$ b

 < a href =tel:555-555-1212> 555-555-1212< / a> 

不带破折号的区号

<$ p $ < code>< a href =tel:5555551212> 555-555-1212< / a>

带破折号和1的区号

 < a href =tel:1-555-555-1212> 555-555-1212< / a> 

不带破折号的区号和1

 < a href =tel:15555551212> 555-555-1212< / a> 

带破折号,1和+符号的地区代码

 < a href =tel:+ 1-555-555-1212> 555-555-1212< / a> 

不带破折号的区号,1和+号

 < a href =tel:+15555551212> 555-555-1212< / a> 


解决方案

最后两个都可以工作。除了让数字更具可读性之外,虚线没有任何意义,所以你不妨包括它们。然而, + 标志是必要的,以便号码可以从国外拨出(即在你的例子中在美国/加拿大以外)。

What is the proper, universal format for creating a clickable hyperlink for users on mobile devices to call a phone number?

Area code with dashes

<a href="tel:555-555-1212">555-555-1212</a>

Area code with no dashes

<a href="tel:5555551212">555-555-1212</a>

Area code with dashes and 1

<a href="tel:1-555-555-1212">555-555-1212</a>

Area code with no dashes and 1

<a href="tel:15555551212">555-555-1212</a>

Area code with dashes, 1 and + sign

<a href="tel:+1-555-555-1212">555-555-1212</a>

Area code with no dashes, 1 and + sign

<a href="tel:+15555551212">555-555-1212</a>

解决方案

Either of the last two would work. Dashes have no significance other than making the number more readable, so you might as well include them. However the + sign is necessary so that the number can be dialed from outside the country (i.e. outside USA/Canada in your example).

这篇关于如何创建超链接在移动设备上拨打电话号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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