一个用jquery实现的简单的通过用户ip获取地址的小应用,免费提供源码~~
代码:
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<p></p>
		<script src="http://www.jq22.com/jquery/jquery-2.1.1.js"></script>
			<script type="text/javascript">
        $.getscript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js', function(_result) {
            if (remote_ip_info.ret == '1') {
              $("p").text('国家:' + remote_ip_info.country  +'\n'+'省:' + remote_ip_info.province +'\n'+'市:' + remote_ip_info.city +'\n'+'区:' + remote_ip_info.district + +'\n'+'isp:' + remote_ip_info.isp +'\n'+'类型:' + remote_ip_info.type + +'\n'+'其他:' + remote_ip_info.desc);
            } else {
                alert('没有找到匹配的ip地址信息!')
            }
        });
</script>
</script>
	</body>
</html>
免费拿去研究吧!更多好的源码尽在,关注我们给你好看哦~
相关推荐:
css 、jquery实现3d立体旋转
jquery实现手势解锁源码
原生js实现可移动的提示div框源码
以上就是jquery实现通过ip获取地址的详细内容。
   
 
   