问题
I need to Make a call to a phonenumber using a PhoneGap Application in IPhone. Here is the code that I am using which is not working
<a href="tel:+1-800-275-2273" style="width:300px;height:67px;margin-bottom:20px;"><img src="image.png" alt="" /></a>
Also I am using childbrowser and mapkit plugin in the app. Can anyone tell me how should I make a call using Phonegap in Iphone app ?
Thanks in advance.
回答1:
I just tried it (copy and paste) without an image but with just text, it tried to dial the number, so it works. Something else must be wrong.
回答2:
This just worked for me:
window.location.href='tel:800-123-4567';
回答3:
Try this out to if you are having problems in iOS 5. This allows you to call a phone via javascript. https://github.com/j-mcnally/PhoneGap-ios-PhoneDialer
回答4:
After the tel:
, try using numerals only, i.e.
<a href="tel:18002752273"><img src="image.png" alt="" /></a>
来源:https://stackoverflow.com/questions/6262289/dial-a-number-using-phonegap-in-iphone