js获取ip和地区
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Document</title>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> <!-- returnCitySN对象是使用了sohu的 -->
<script type="text/javascript">
console.log(returnCitySN);
document.write('使用的搜狐IP地址:' + returnCitySN["cip"] + ', CID:' + returnCitySN["cid"] + ', 地区:' + returnCitySN["cname"]);
}
</script>
</head>
<body>
</body>
</html>