转自:https://www.cnblogs.com/billybobby/p/6729799.html
引用下面的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
引用下面的js:
<
script
src
=
"http://pv.sohu.com/cityjson?ie=utf-8"
></
script
>
直接获取IP和城市名:
alert(returnCitySN['cip'] + returnCitySN['cname']);