获取协议 window.location.protocol 获取域名 document.location.hostname 获取完整域名(包括端口) window.location.protocol+"//"+window.location.host