首页 > 代码库 > js获取IP地址

js获取IP地址

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> 
    <script type="text/javascript">  
        document.write(IP地址: + returnCitySN["cip"] + , CID: + returnCitySN["cid"] + , 地区: + returnCitySN["cname"]);
    </script>
</head>

<body> 
</body>
</html>

 

js获取IP地址