Window location.search attribute
- Forrige side replace()
- Næste side assign()
- Gå tilbage til forrige niveau Window Location
Definition and usage
search
The attribute returns the URL's query string part, including the question mark (?).
search
The attribute can also be used to set the query string.
Comment
The query string part is the part after the question mark (?) in the URL.
Query strings are used to pass parameters.
Syntax
Return search attribute:
location.search
Set search attribute:
location.search = querystring
Attribute value
Value | Description |
---|---|
querystring | URL's query string part. |
Return value
Type | Description |
---|---|
String | URL's query string part, including the question mark (?). |
Browserunderstøttelse
Alle browsere understøtter location.search
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Forrige side replace()
- Næste side assign()
- Gå tilbage til forrige niveau Window Location