开发者

Get users number from iPhone using HTML5/jQuery

Is there a method for getting the iPhone users phone number using HTML5/jQuery?

All I see is how to do this with the SDK.

EDIT:

So far the only thing I've found is on the initi开发者_如何学编程al install ask the user for their number and store it.


I am pretty sure, that this is not possible. Imagine the security/privacy breach it would represent if any site could just retrieve the phone number of each visitor.

If you are developing a HTML5 & JS app with PhoneGap for example you can, using the according API: http://docs.phonegap.com/en/1.0.0/phonegap_contacts_contacts.md.html


There is a Draft from W3C on Device API. This API will provide access (submitted to user permission) to Tasks, Contacts, Calendar, Camera, Microphone, Messaging Service, Communication Log, System Information (device information, battery level, network status, ...),... But it is not yet implmented in any browser.

Because of a big expectation, these APIs will probably be implemented very quickly in WebKit (base of iPhone and Android browsers). Mozilla is working on a draft implementation of Contact API with the Contact AddOn


You could just ask the user:

var phone_number = prompt("Please enter your phone number:");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜