window.location
1: hash
该属性是一个可读可写的字符串,该字符串是url的锚部分(#开始以后部分)
window.location.hash = anchorname
http://example.com:1234/test.htm#part2 => part2
2:host
该属性可读可写,可设置或返回当前url的主机名和端口号。 http://example.com:1234/test.htm#part2 => example.com:1234
3:hostname
该属性可读可写,可设置或返回当前url的主机名。
http://example.com:1234/test.htm#part2 => example.com
4:href
该属性可读可写,返回完整的url
http://example.com:1234/test.htm#part2 => http://example.com:1234/test.htm#part2
5:pathname
该属性可读可写,可设置或返回url的路径部分
http://example.com:1234/test/test.html#part2 => /test/test.html
6:port
port 属性是一个可读可写的字符串,可设置或返回当前 URL 的端口部分。
http://example.com:1234/test.htm#part2 => 1234
7:protocol
protocol 属性是一个可读可写的字符串,可设置或返回当前 URL 的协议。
http://example.com:1234/test.htm#part2 => http
8:search
search 属性是一个可读可写的字符串,可设置或返回当前 URL 的查询部分(问号 ? 之后的部分)。
https://editor.csdn.net/md?not_checkout=1&articleId=108315996 => not_checkout=1&articleId=108315996