html中的电话号码

1. 打电话
在android的浏览器中,如果电话号码是 XXX-XXX-XXXX的型式的话,用户点击的时候,拨号面板会激活,但是如果不是这一特定的格式,那么拨号功能是不会启动的。其实可以通过链接的方式激活拨号面板。
(1) IPhone的写法

[phone_number] 就是电话号码了

<a href="callto:[phone_number]">phone_number</a>

例子:

<a href="callto:12345678">12345678</a>
(2) Android的写法
[phone_number] 就是电话号码了

<a href="wtai://wp/mc;[phone_number]">phone_number</a>
例子:
<a href="wtai://wp/mc;12345678">12345678</a>
在电话号码前面可以加上 + (加号)表示国际号码。如:

<a href="wtai://wp/mc;+12345678">+12345678</a>

2. 短信
如果是需要调用短信的接口,可以将链接写成下面的格式: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>

现在一般用在链接上加入<a href="tel:1233434334">

来源:http://www.w3cfuns.com/article-5599630-1-1.html





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值