Location Object
The search property returns the query portion of a URL, including the question mark (?).
![]()
The search property is supported in all major browsers.
Return the query portion of a URL. Assume that the current URL is http://www.example.com/submit.htm?email=someone@example.com:
The output of the code above will be:
Location Object
Your message has been sent to W3Schools.