1、location对象 location对象类型location.href属性返回当面页面的URLlocation.hostname主机域名location.pathname当前页面的路径和文件名location.port端口location.protocol协议