标签:location class 位置 rip err pos func etc sha
浏览器获取经纬度:
<script> navigator.geolocation.getCurrentPosition(function(pos,error){ if(!navigator.geolocation) throw "geolocation not support"; latitude=pos.coords.latitude; longitude=pos.coords.longitude; var accuracy=pos.coords.accuracy; console.log("当前位置:经度:"+latitude+" 纬度:"+longitude+" 精度:"+accuracy); }); </script>
标签:location class 位置 rip err pos func etc sha
原文地址:https://www.cnblogs.com/mracale/p/9946545.html