1、document.location.href
获取网址包含协议

2、document.location.host
获取网址不包含协议

1、document.location.search
获取?后面参数(包括问号?)

1、document.location.pathname
获取文件路径

1、document.location.protocal

时间:2026-02-14 10:46:46
1、document.location.href
获取网址包含协议

2、document.location.host
获取网址不包含协议

1、document.location.search
获取?后面参数(包括问号?)

1、document.location.pathname
获取文件路径

1、document.location.protocal
