WAP站定位

通过HTML5定义的接口调用。

具体能否成功, 要看浏览器是否实现,试过UC, chrome都是可以的。

 

navigator.geolocation.getCurrentPosition(displayLocation,error); function displayLocation(position) { text = "Userlatitudeis "+position.coords.latitude+" andlongitudeis "+position.coords.longitude; console.log(text); } function error(err) { console.log("error.code:%s",err.code); }

 

可以直接在PC上用chrome调试看看, 也可以用UC开发版连电脑测试。

 


WAP站定位
 

 

你可能感兴趣的:(WAP)