下面的这篇文章主要是说,网页中的连接如何写,能够激活电话的功能。html
例如,页面中展现的是一个电话号码,当用户在手机浏览器里面点击这个电话号码的时候,手机会弹出拨号的面板,或者是短信程序会启动等。android
1. 打电话web
在android的浏览器中,若是电话号码是 XXX-XXX-XXXX的型式的话,用户点击的时候,拨号面板会激活,可是若是不是这一特定的格式,那么拨号功能是不会启动的。其实能够经过连接的方式激活拨号面板。windows
(1) IPhone的写法浏览器
<a href="callto:[phone_number]">phone_number</a>
<a href="callto:12345678">12345678</a>
(2) Android的写法app
<a href="wtai://wp/mc;[phone_number]">phone_number</a>
<a href="wtai://wp/mc;12345678">12345678</a>
在电话号码前面能够加上 + (加号)表示国际号码。如:ide
<a href="wtai://wp/mc;+12345678">+12345678</a>
2. 短信wordpress
若是是须要调用短信的接口,能够将连接写成下面的格式:工具
sms:<phone_number>[,<phone-number>]*[?body=<message_body>]
例如:视频
<a href="sms:12345678">给 12345678 发短信</a> <a href="sms:12345678?body=hello">给 12345678 发送内容为"hello"的短信</a> <a href="sms:12345678,98765432?body=hello">给12345678和98765432 发送内容为"hello"的短信</a>
3. Android Market
若是但愿一个连接可以激活Android市场的功能,能够把连接写成:
<a href="market://search?q=[query]">Android Market link</a>
其中<query>就是搜索的内容,你应用的名称
例子:
<a href="market://search?q=MyApp">MyApp</a>
4. Ovi Store
这是诺基亚Nokia的一个应用市场。
<a href="http://store.ovi.com/content/XXXXX">MyApp</a>
XXXX就是你的应用的ID(application Id)。
5. Windows Marketplace
微软的应用市场
<a href="http://marketplace.windowsphone.com/details.aspx?appId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">MyApp</a>
其中 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 只的就是应用的ID
6. BlackBerry App World
黑莓的应用市场
<a href="http://appworld.blackberry.com/webstore/content/XXXXX">MyApp</a>
连接中的XXXX就是应用ID。下面这个是做者页面的URL
<a href="http://appworld.blackberry.com/webstore/vendor/XXXX">MyApp</a>
其中的XXXX是指做者的ID
7. 地图定位GPS
<a href="geopoint:[经度],[纬度]">个人位置</a>
例如:
<a href="geopoint:100,23">个人位置</a>
8. 聊天工具
(1) Yahoo Messager
<a href="ymsgr:[动做]?[用户名]&m=[消息]">Yahoo Messager</a>
[动做]有:addfriend, sendIM, call
例子:
<a href="ymsgr:sendIM?my.account@yahoo.com">给my.account@yahoo.com发消息</a>
(2) Windows Messager (MSN)
<a href="msnim:[动做]?contact=[用户名]">Windows Messager</a>
[动做]有:chat (聊天), add (添加成联系人), voice (语音), video (视频)
例子:
<a href="msnim:chat?contact=my.account@hotmail.com">MSN</a>
(3) Google Talk (GTalk)
<a href="gtalk:[动做]?jid=[用户名]&from_jid=[本身的用户名]">GTalk</a>
[动做]有:chat (聊天),call (语音)
例子:
<a href="gtalk:chat?jid=your@gmail.com&from_jid=my@gmail.com">GTalk</a>
(4) Skype
<a href="skype:[用户名]?[动做]">Skype</a>
[动做]有:chat, add, userinfo, voicemain
例子:
<a href="skype:mySkypeId?chat">Skype</a>
9. Mail 邮件
就和普通的html同样使用mailto
<a href="mailto:nobody@wordpress.com"></a> <a href="mailto:nobody@wordpress.com,no.one@wordpress.com"></a> <a href="mailto:nobody@wordpress.com?subject=Testing"></a> <a href="mailto:nobody@wordpress.com?subject=Testing mailto&cc=no.one@wrodpress.com"></a>