The search property represents the query portion of the URL, including the preceding question mark.
For example, the search for http://www.rntsoft.com/search.htm?term=javascript is ?term=javascript.
Using the search property of the Location object