获取协议(带冒号,“https:”) : window.location.protocol
获取主机(带端口号,“localhost:8080”) : window.location.host
window.location还有其他属性,如port等,具体可参考dhtml手册。
获取协议(带冒号,“https:”) : window.location.protocol
获取主机(带端口号,“localhost:8080”) : window.location.host
window.location还有其他属性,如port等,具体可参考dhtml手册。