javascript获取当前用户访问的宽带IP地址 <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script><script> var ip=returnCitySN.cip;console.log("用户获得当前的宽带IP地址为:"+ip);</script>
Java的api的说法: getHeader public java.lang.String getHeader(java.lang.String name) Return the first value of the specified header, if any; otherwise, return null 返回指定标头的第一个值(如果有的话):否则返回null. Specified by: getHeader in interface javax.servlet.http.HttpSe