js获取服务端IP及端口及协议

时间:2014-09-11 18:47:52   收藏:0   阅读:307
alert("location:"+window.location);
alert("href: "+window.location.href);
alert("protocol: "+window.location.protocol);
alert("host&port: "+window.location.host);
alert("port: "+window.location.port);
alert("hostname: "+window.location.hostname);

 

原文:http://www.cnblogs.com/smile361/p/3966843.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!