js如何獲取當前使用者訪問的ip地址以及城市地區?

空乏其身發表於2017-12-23

引用下面的js:

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>

直接獲取IP和城市名:

 alert(returnCitySN['cip'] + returnCitySN['cname']);


轉載地址:https://www.cnblogs.com/billybobby/p/6729799.html

相關文章