Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在浏览器中使用地理定位器来检测用户的位置。是否可以使用代码在内部启用浏览器共享位置?
不,地理定位 API 明确规定:“未经用户明确许可,用户代理不得向网站发送位置信息。” 换句话说,共享您的位置始终是选择加入的。如果你不想,你不必。
http://diveintohtml5.info/geolocation.html