Yawee

js获取当前访问者的IP地址和所属地市代码
调用了搜狐的ip地址库。 (function ip() { var str='你的ip是:'+returnCi...
扫描右侧二维码阅读全文
14
2016/10

js获取当前访问者的IP地址和所属地市代码

调用了搜狐的ip地址库。

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> 
<font id="ip" size="5"></font>
<script type="text/javascript">
(function ip() {
var str=returnCitySN["cip"]+','+returnCitySN["cname"];
var _result=document.getElementById("ip");
_result.innerHTML = str;
})();
</script>

 

Last modification:June 16th, 2018 at 02:21 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment