在浏览器的console层输入 location 即可输出该对象的相关信息
location.protocol 协议类型 http/https
location.hostname 主机名
location.host 主机名加端口
location.search url参数"?demo=1&ww=1"
location.hash 哈希值 "#111"
location.port 端口 8080
在浏览器的console层输入 location 即可输出该对象的相关信息
location.protocol 协议类型 http/https
location.hostname 主机名
location.host 主机名加端口
location.search url参数"?demo=1&ww=1"
location.hash 哈希值 "#111"
location.port 端口 8080