获取登录的地点和ip地址的js

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
 <script>document.getElementById("ip").value=returnCitySN.cip;</script>

直接浏览器访问http://pv.sohu.com/cityjson?ie=utf-8

会返回一个json数据,如:var returnCitySN = {"cip": "14.156.3.240", "cid": "440000", "cname": "广东省"};

文章来自:http://www.cnblogs.com/lvchenfeng/p/5132537.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3