找了好多例子都不太好用,这个倒是可以。

引用下面的js:

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

直接获取IP和城市名:

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-05
  • 2021-11-26
  • 2021-12-30
  • 2022-12-23
  • 2022-01-02
  • 2021-10-28
  • 2022-12-23
相关资源
相似解决方案