How to trigger a phone call when clicking a link in a web page on mobile phone

前端 未结 6 1284
逝去的感伤
逝去的感伤 2020-11-28 01:00

I need to build a web page for mobile devices. There\'s only one thing I still haven\'t figured out: how can I trigger a phone call through the click of text?

Is the

6条回答
  •  甜味超标
    2020-11-28 01:33

    Want to add an answer here for the sake of completeness.

    Call 123-4567
    

    Works just fine on most devices. However, on desktops this will appear as a link which does nothing when you click on it so you should consider using CSS to make it conditionally visible only on mobile devices.

    Also, you should know that Skype (which is fairly popular) uses a different syntax by default (but can be parametered to use tel:).

    Call 123-4567
    

    However, I think in latest mobile browsers (I know for sure on Android) now the tel syntax should offer a popup of available applications that can be used to complete the calling action.

提交回复
热议问题