美文网首页
js获取ip地址

js获取ip地址

作者: WangYatao | 来源:发表于2017-12-18 13:38 被阅读710次
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>JavaScript获取客户端IP</title>
    </head>
    <body>
    </body>
    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>  
    <script type="text/javascript">  
    document.write(returnCitySN["cip"]+','+returnCitySN["cname"])  
    </script>
    </html>
    
    

    相关文章

      网友评论

          本文标题:js获取ip地址

          本文链接:https://www.haomeiwen.com/subject/hlfmwxtx.html