- location.host
- //location成员变量
- document.writeln(location.protocol);
- document.writeln(location.origin);
- document.writeln(location.host);
- document.writeln(location.port); //默认为80的就为空
- document.writeln(location.pathname);
- //该片段来自于http://www.codesnippet.cn/detail/2512201411392.html
来源: http://www.codesnippet.cn/detail/2512201411392.html