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

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);

 

posted @ 2014-09-11 16:54  欢歌911  阅读(3572)  评论(0编辑  收藏  举报