点击运行
window.location 对象
注释:
如果端口号是默认值(对于 http 为 80,对于 https 为 443),则大多数浏览器将显示 0 或不显示。
运行结果