利用搜狐查询接口查询Ip地址:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>GetIp</title>
</head>
<body>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script>
document.write(returnCitySN["cip"] + ',' + returnCitySN["cname"])
</script>
</body>
</html>
也可以直接通过链接查看返回结果:http://pv.sohu.com/cityjson?ie=utf-8