The search
property returns the querystring part of a URL, including the question mark (?).
The search
property can also be used to set the querystring.
The querystring part is the part of the URL after the question mark (?).
The querystring is used for parameter passing.
Return the search property:
location.search
Set the search property:
location.search =
querystring
Parameter | Description |
querystring | The querystring part of the URL |
Type | Description |
A string | The querystring part of a URL, including the question mark (?) |
location.search
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!