$.ajax({ url:'https://api.ipify.org?format=jsonp', type:'GET', dataType:'jsonp', success:function(data){ gh_IPAddress=data.ip; } })
结果:callback({"ip":"123.52.42.166"});
获取所在的省市
js引用 https://www.czhuihao.cn/ip/
结果:var lo="", lc="湖南省"; var localAddress={city:"", province:"湖南省"}
标签:省市,ip,JS,获取,https,var From: https://www.cnblogs.com/romanticcrystal/p/17016342.html