href =“ tel:”和手机号码

本文讨论了如何使用`href="tel:"`书写国际电话号码,包括在不同国家/地区的拨打规则,以及如何处理手机号码的国际格式。同时提到了BlackBerry和iOS设备自动识别电话号码的功能,以及如何阻止这种行为。此外,还介绍了如何在号码中添加等待或分机号的标记语言。
摘要由CSDN通过智能技术生成

本文翻译自:href=“tel:” and mobile numbers

If I use tel: I should write the international phone code, like that. 如果我使用tel:我应该这样写国际电话代码。

<a href="tel:+6494461709">61709</a>

So far, so good, but I can't find information on how to write a cell phone number in an "international" way, if there is one. 到目前为止,还算不错,但是如果有的话,我找不到有关如何以“国际”方式写手机号码的信息。


#1楼

参考:https://stackoom.com/question/1AFcu/href-tel-和手机号码


#2楼

I know the OP is asking about international country codes but for North America, you could use the following: 我知道OP正在询问国际国家/地区代码,但对于北美,您可以使用以下代码:

 <a href="tel:1-847-555-5555">1-847-555-5555</a> <a href="tel:18475555555">Click Here To Call Support 1-847-555-5555</a> 

This might help you. 这可能对您有帮助。


#3楼

When dialing a number within the country you are in, you still need to dial the national trunk number before the rest of the number. 在您所在国家/地区内拨打号码时,仍然需要先拨打国家中继号码。 For example, in Australia one would dial: 例如,在澳大利亚,您会拨打:

   0 - trunk prefix
   2 - Area code for New South Wales
6555 - STD code for a specific telephone exchange
1234 - Telephone Exchange specific extension.

For a mobile phone this becomes 对于手机来说,这变成了

   0 -      trunk prefix
   4 -      Area code for a mobile telephone
1234 5678 - Mobile telephone number

Now, when I want to dial via the international trunk, you need to drop the trunk prefix and replace it with the international dialing prefix 现在,当我想通过国际中继拨号时,您需要删除中继前缀并将其替换为国际拨号前缀。

   + -      Short hand for the country trunk number
  61 -      Country code for Australia
   4 -      Area code for a mobile telephone
1234 5678 - Mobile telephone number

This is why you often find that the first digit of a telephone number is dropped when dialling internationally, even when using international prefixing to dial within the same country. 这就是为什么您经常发现在拨打国际电话时,即使使用国际前缀在同一国家/地区内拨打电话时,电话号码的第一位数字也被丢弃的原因。

So as per the trunk prefix for Germany drop the 0 and add the +49 for Germany's international calling code (for example) giving: 因此,按照德国中继线前缀,0删除,然后将+49用作德国的国际电话代码 ,例如:

 <a href="tel:+496170961709" class="Blondie"> Call me, call me any, anytime <b>Call me (call me) I'll arrive</b> When you're ready we can share the wine! </a> 


#4楼

The BlackBerry browser and Safari for iOS (iPhone/iPod/iPad) automatically detect phone numbers and email addresses and convert them to links. BlackBerry浏览器和iOS版Safari(iPhone / iPod / iPad)会自动检测电话号码和电子邮件地址,并将它们转换为链接。 If you don't want this feature, you should use the following meta tags. 如果您不希望使用此功能,则应使用以下元标记。

For Safari: 对于Safari:

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

For BlackBerry: 对于BlackBerry:

<meta http-equiv="x-rim-auto-match" content="none">

Source: mobilexweb.com 资料来源: mobilexweb.com


#5楼

It's the same. 一样的。 Your international format is already correct, and is recommended for use in all cases, where possible. 您的国际格式已经正确,建议尽可能在所有情况下使用。


#6楼

As an additional note, you may also add markup language for pausing or waiting, I learned this from the iPhone iOS which allows numbers to be stored with extension numbers in the same line. 另外,您还可以添加标记语言以暂停或等待,这是我从iPhone iOS中学到的,它允许数字与分机号存储在同一行中。 A semi-colon establishes a wait , which will show as a next step upon calling the number. 分号建立一个wait ,它将在呼叫该号码时显示为下一步。 This helps to simplify the workflow of calling numbers with extensions in their board. 这有助于简化在其分机板中拨打电话的工作流程。 You press the button shown on the bottom left of the iPhone screen when prompted, and the iPhone will dial it automatically. 出现提示时,按iPhone屏幕左下方显示的按钮,iPhone会自动拨号。

<a href="tel:+50225079227;1">Call Now</a>

The pause is entered with a comma ",", allowing a short pause of time for each comma. 暂停用逗号“,”输入,每个逗号的暂停时间很短。 Once the time has passed, the number after the comma will be dialed automatically 时间过后,逗号后的号码将自动拨打

<a href="tel:+50225079227,1">Call Now, you will be automaticlaly transferred</a>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值