这个location 对象包含有关当前 URL 的信息。
这个location 对象是的属性窗口对象。
这个location 对象通过以下方式访问:
window.location
要不就location
Property | Description |
---|---|
hash | Sets or returns the anchor part (#) of a URL |
host | Sets or returns the hostname and port number of a URL |
hostname | Sets or returns the hostname of a URL |
href | Sets or returns the entire URL |
origin | Returns the protocol, hostname and port number of a URL |
pathname | Sets or returns the path name of a URL |
port | Sets or returns the port number of a URL |
protocol | Sets or returns the protocol of a URL |
search | Sets or returns the querystring part of a URL |
Method | Description |
---|---|
assign() | Loads a new document |
reload() | Reloads the current document |
replace() | Replaces the current document with a new one |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!