Is there ANY way to get a Smart Phone number from website?

前端 未结 3 524
陌清茗
陌清茗 2021-01-17 04:56

I\'m searching for a way to get the phone number of a device using HTML 5, Javascript or something like it. Recently, I wanted to get the coordinates of the device. I could

3条回答
  •  无人及你
    2021-01-17 05:59

    There is no reliable way to get a phone number with JavaScript without prompting the user. That is, it cannot be retrieved automatically using a browser API.

    It is possible inside of certain Android / iPhone application views. See discussions here: How can I get the device's phone number through JavaScript in Android?. And here: Getting the local iPhone number through SDK

    As mentioned in comments, this is not a good thing to do in general (privacy, etc.). Definitely prompt the user for input if the phone number is needed.

提交回复
热议问题