如果我使用tel:
,我应该像这样写国际电话代码。
<a href="tel:+6494461709">61709</a>
到目前为止,一切都很好,但我找不到有关如何以“国际”方式编写手机号码的信息,如果有的话。
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:
<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>
我知道 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>
这可能会帮助你。
BlackBerry 浏览器和 Safari for iOS (iPhone/iPod/iPad) 自动检测电话号码和电子邮件地址并将它们转换为链接。如果您不想要此功能,则应使用以下元标记。
对于 Safari:
<meta name="format-detection" content="telephone=no">
对于黑莓:
<meta http-equiv="x-rim-auto-match" content="none">
资料来源:mobilexweb.com
作为附加说明,您还可以添加用于暂停或等待的标记语言,我从 iPhone iOS 中了解到这一点,它允许将号码与分机号码存储在同一行中。分号表示等待,这将在呼叫号码时显示为下一步。这有助于简化在其板上使用扩展名拨打号码的工作流程。当出现提示时,您按下 iPhone 屏幕左下方显示的按钮,iPhone 将自动拨号。
<a href="tel:+50225079227;1">Call Now</a>
暂停用逗号“,”输入,允许每个逗号有一个短暂的暂停时间。时间一到,逗号后面的号码会自动拨打
<a href="tel:+50225079227,1">Call Now, you will be automaticlaly transferred</a>
一样的。您的国际格式已经正确,建议尽可能在所有情况下使用。