Location search Property
Return the query portion of a URL. Assume that the current URL is http://email@example.com:
The result of x will be:
Definition and Usage
The search property sets or returns the query portion of a URL, including the question mark (?).
The query portion is the part of the URL after the question mark (?) (this is often used for parameter passing).
The search property is supported in all major browsers.
Return the search property:
Set the search property:
|querystring||String||Specifies the search part of the URL|
|String||The query portion of a URL, including the question mark (?)|
Thank You For Helping Us!
Your message has been sent to W3Schools.