根据浏览器的位置获取当前位置
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
long = position.coords.longitude;
lat = position.coords.latitude;
$("#data").html("latitude: " + lat + "</br>longitude: " + long);
})
};