您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

js实现PC端根据IP定位当前城市地理位置

2024/5/1 20:29:49发布24次查看
话不多说,请看代码:
<script type="text/javascript"> $.getscript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js', function(_result) { if (remote_ip_info.ret == '1') { alert('国家:' + remote_ip_info.country +'\n省:' + remote_ip_info.province + '\n市:' + remote_ip_info.city + '\n区:' + remote_ip_info.district + '\nisp:' + remote_ip_info.isp + '\n类型:' + remote_ip_info.type + '\n其他:' + remote_ip_info.desc); } else { alert('没有找到匹配的ip地址信息!'); } }); </script>
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持!
更多js实现pc端根据ip定位当前城市地理位置。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product