简体   繁体   English

电话URI href =“ tel:”和虚荣号码?

[英]Tel URI href=“tel:” and vanity numbers?

I was trying to add a vanity number in the href="tel:" link (eg tel:"+1800FLOWERS"), but now I am actually not sure if this would work on all devices, or is it more acurate if I just write the numbers out? 我试图在href =“ tel:”链接中添加一个虚荣号码(例如tel:“ + 1800FLOWERS”),但是现在我不确定这是否适用于所有设备,或者我是否更准确?把数字写出来吗? I mean it would look nicer as vanity. 我的意思是虚荣心会更好。

Thanks in advance 提前致谢

The tel: scheme was originally defined in RFC2806 , which only defined support for digits and some additional characters (see section 2.2). tel:方案最初是在RFC2806中定义的,仅定义了对数字和一些其他字符的支持(请参阅第2.2节)。

RFC3966 , which obsoletes RFC2806, explicitly states that vanity numbers are not supported. RFC3966 ,它淘汰了RFC2806,明确指出,个性化电话号码不被支持。 From section 5.1.2: 从5.1.2节开始:

5.1.2. 5.1.2。 Alphabetic Characters Corresponding to Digits 对应于数字的字母字符

In some countries, it is common to write phone numbers with 在某些国家/地区,通常使用
alphabetic characters corresponding to certain numbers on the 对应于某些数字的字母字符
telephone keypad. 电话键盘。 The URI format does not support this notation, as URI格式不支持此表示法,因为
the mapping from alphabetic characters to digits is not completely 从字母字符到数字的映射不完全
uniform internationally, although there are standards [E.161][T1.703] addressing this issue. 尽管有解决此问题的标准[E.161] [T1.703],但在国际上是统一的。

So you should only use regular numbers in the href attribute. 因此,您应仅在href属性中使用常规数字。 You can still use the vanity number in the text itself, eg: 您仍然可以在文本本身中使用个性编号,例如:

<a href="tel:+1-800-356-9377">+1800FLOWERS</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM