无连接协议 有链接协议_电话链接协议

无连接协议 有链接协议

We've always been able to create links with protocols other than the usual HTTP, like mailto, skype, irc ,and more;  they're an excellent convenience to visitors.  With mobile phone browsers having become infinitely more usable, we can now extend that convenience to phone numbers:

我们始终能够使用非常规HTTP的协议创建链接,例如mailto ,skype,irc等。 它们为游客提供了极大的便利。 随着手机浏览器变得越来越可用,我们现在可以将便利性扩展到电话号码:

The tel protocol is used for phone numbers:

tel协议用于电话号码:


<a href="tel:18008675309">Call Jenny!</a>


If you'd like to create a link for SMS text messaging, that's easy enough too:

如果您想为SMS文本消息创建链接,这也很容易:


<a href="sms:18008675309">Text Jenny!</a>


The sms protocol is used for text.

sms协议用于文本。

Many mobile browsers automatically linkify phone numbers on webpages but with the snippet above you can forcibly create phone links!  Since said links don't work on desktop browsers, it's probably wise to create a JS snippet to replace spans with a given CSS class with phone links.

许多移动浏览器会自动链接网页上的电话号码,但是通过上面的摘录,您可以强制创建电话链接! 由于上述链接在桌面浏览器上不起作用,因此创建JS代码段以使用电话链接将CSS范围替换为给定CSS类可能是明智的。

翻译自: https://davidwalsh.name/phone-link-protocol

无连接协议 有链接协议

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值