js通过IP地址获取所在城市
话不多说,直接贴代码!
将这段代码运行一下就OK了:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body>
</body>
</html>
http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js
var remote_ip_info = {"ret":1,"start":"1.192.0.0","end":"1.193.127.255","country":"\u4e2d\u56fd","province":"\u6cb3\u5357","city":"\u90d1\u5dde","district":"","isp":"\u7535\u4fe1","type":"","desc":""};
country:国家
province:省份
city:城市
isp:所用网络(例如电信)
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。