开发者

read gsm number from iphone through javascript

Is it possible through javascript to read the number from the 开发者_JAVA技巧iphone. Lets say i have a html page where they have to fill in the gsm number, can javascript read the number from the phone and fill the form with it?


From JavaScript, it's not possible. Actually, the iPhone itself might not know it at all, as the phone number is not necessarily stored on your SIM card.


It should be noted that if you are writing your own iPhone application, you can use following:

  1. UIWebView class: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html

  2. You can have HTML code in the your application bundle (or just anywhere on the web)

  3. You can execute any Javascript on that HTML using this method: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW21


There is a Draft from W3C on System Information API into the Device API section. But it is not yet implmented in any browser.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜