2021-02-25 10:18发布
ip定位,可以定位国外ip,显示出经纬度和城市的api有哪些?百度现在都没有这个功能了,有国外的api可以实现这个的吗?
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, //是否缓存 可以为false success: function (data) { alert(JSON.stringify(data)); }, error: function (data) { // alert(JSON.stringify(data)); } }); } ---------------------
最多设置5个标签!
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, //是否缓存 可以为false
success: function (data) {
alert(JSON.stringify(data));
},
error: function (data) {
// alert(JSON.stringify(data));
}
});
}
---------------------
一周热门 更多>