JS 使用搜狐接口获取客户端IP地址

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>使用搜狐接口获取客户端IP地址</title>
</head>
<body>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>  
<script type="text/javascript">  
document.write(returnCitySN["cip"]+','+returnCitySN["cname"])  
</script>
</body>
</html>

效果图:

 

猜你喜欢

转载自onestopweb.iteye.com/blog/2263088