目的:js前端获取用户的IP地址
解决办法:
html前端代码:直接运行就好
<HTML> <HEAD> <TITLE>WMI Scripting HTML</TITLE> </HEAD> <BODY> <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> <script> document.write(returnCitySN["cip"]+','+returnCitySN["cname"]) </script> </BODY> </HTML>