问题
I currently have a webpage serving up phone numbers, some of these phone numbers have extensions so I have written the HTML like this:
<a href="tel:+44-1234-567;ext=88">+44-1234-56788</a> / <a href="tel:+44-1234-567;ext=99">+44-1234-56799</a
When I hit this page in my Android browser and tap one of the phone numbers, it loads up in my phone dialer (UK Samsung Galaxy s2 stock) as:
+44-1234-567;ext=88
which I don't think is correct. Surely it should omit the ;ext=
word.
Have I misread the RFC for implementing tel
?
回答1:
Seems the proper way to do it is use a comma:
<a href="tel:441234567,88">+44-1234-567 ext.88</a>
Just tested with iPhone and Android OS 2.1. Using ;ext=88
converts the ext bit into a number that is dialed with the extension (so it dials something like 35888 instead of 88).
回答2:
According to the documentation, you can add what you want like so tel:12345678;ext=123
See RFC 3966
回答3:
In all the examples I saw, the value of ext
is contained in the full number. So try including 88 in the href
value:
<a href="tel:+44-1234-56788;ext=88">+44-1234-56788</a>
回答4:
Standards at thenewcode from 3 months ago suggest using a microdata pause.
<a href="tel:+13235798328p22">
Related: Different standards persist across different external platforms and may change the processing of URIs. Click to call features on Google Developers docs do not specify
Example: Office's Skype uses x to represent extension within skype.
回答5:
For those still wondering about this problem: I've found it best to use this format:
<a href="tel:+13235798328;22">
来源:https://stackoverflow.com/questions/9482633/how-do-i-include-extensions-in-the-tel-uri