onClick-拨打电话号码 [英] onClick - call phone number
本文介绍了onClick-拨打电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
电话访问的网址方案
iphone Safari拨打电话
Possible Duplicate:
URL Scheme for Phone Call
iphone safari making phone call
我在移动网站上使用下面的代码,但是当有人单击时,我不希望他们进入新页面,所以我希望拨打电话号码.使用onClick函数可以做到这一点吗?
I am using the code below on a mobile site but when somebody clicks I don't want them directed to a new page I want a phone number to be called. Is this possible using the onClick function?
<div class="button left" id="map" onClick="window.location='#'"><span class="bottom">Call us now</span></div>
推荐答案
您应该使用
<a href="tel:[phone number]"><span class="bottom">Call us now</span></a>
这篇关于onClick-拨打电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文