根据IP获取经纬度 js

匿名 (未验证) 提交于 2019-12-02 23:57:01
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="https://code.jquery.com/jquery-3.4.1.min.js" ></script> <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> <script> function getXYbyIP() {  var url="https://api.map.baidu.com/location/ip?ak=HQi0eHpVOLlRuIFlsTZNGlYvqLO56un3&coor=bd09ll"; $.ajax({     url:url,     type: 'POST',      dataType: 'JSONP',     async: false,      cache: true,      success: function (data) {          console.log(data)             },      error: function (data) {      }   });  } getXYbyIP(); </script> </head> <body> </body> </html>

  

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!