简体   繁体   English

iPhone Safari拨打电话

[英]iPhone Safari making a phone call

Is there something I can put in the code for an HTML page I am making for Safari on iPhone to make a call when clicked on? 我是否可以在HTML页面的代码中添加一些内容,我在iPhone上使用Safari来点击时拨打电话? Something similar to: 类似的东西:

<a href="tel://1300111222">click to call</a>

尝试从链接中删除//,即<a href="tel:1300111222">click to call</a>

As Nava answered, remove // from your link. 当Nava回答时,从链接中删除//。

But if you are using same web-application for desktop as well as mobile, then this won't work for your desktop and when you click on link, page will gone to "tel:XXXXXXXX". 但是,如果您使用相同的Web应用程序用于桌面和移动,那么这将不适用于您的桌面,当您单击链接时,页面将转到“tel:XXXXXXXX”。 So this idea became fail. 所以这个想法失败了。

Try using "callto" instead of "tel" like this 尝试使用“callto”而不是“tel”

<a href='callto:1300111222'>Click to call</a>

Then if you are using mobile browser, then it will show call prompt and if you are using windows browser, then it will prompt you to call with "Skype" and any other related application. 然后,如果您使用的是移动浏览器,那么它将显示呼叫提示,如果您使用的是Windows浏览器,则会提示您使用“Skype”和任何其他相关应用程序进行呼叫。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM