read gsm number from iphone through javascript

◇◆丶佛笑我妖孽 提交于 2020-01-03 06:28:22

问题


Is it possible through javascript to read the number from the 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?


回答1:


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.




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/2386011/read-gsm-number-from-iphone-through-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!