Return the querystring part of a URL. Assume that the current URL is http://www.w3schools.com/submit.htm?email=someone@example.com:
The result of x will be:
The search property sets or returns the querystring part of a URL, including the question mark (?).
The querystring part is the part of the URL after the question mark (?). This is often used for parameter passing.
Property | |||||
---|---|---|---|---|---|
search | Yes | Yes | Yes | Yes | Yes |
Return the search property:
Set the search property:
Value | Type | Description |
---|---|---|
querystring | String | Specifies the search part of the URL |
Return Value: | A String, representing the querystring part of a URL, including the question mark (?) |
---|