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:
UIWebView class: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html
You can have HTML code in the your application bundle (or just anywhere on the web)
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.
精彩评论