搜狐JS查ip

时间:2021-03-08 15:10:18
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
</head>
<body>
<script type="text/javascript">
//脚本中获取,cip为要获取的ip,cname为ip所在城市
document.write(returnCitySN["cip"]+','+returnCitySN["cname"])
</script>
</body>
</html>