最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
js实现PC端根据IP定位当前城市地理位置
时间:2017-04-29 编辑:简简单单 来源:一聚教程网
话不多说,请看代码:
代码如下 | 复制代码 |
$.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地址信息!'); } }); |
-
上一个: 纯JS实现轮播图
相关文章
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31
- html使用表单标签实现注册页面代码展示 10-31
- 使用HTML截图并保存为本地图片的代码展示 10-31