JavaScript » Link » search

Syntax:
object.search

The search property is a string beginning with a question mark that specifies any query information in an HTTP URL.

Search is a property of both the Link and the Location objects and is a string beginning with a question mark that specifies any query information in an HTTP URL. It contains one or more pairs of variables and values, separated by ampersands.

NOTE:
 
Although the search property can be set at any time, it is safer to set the href property to change a location.

Examples

Code:
document.write(document.links[0].search)
Output:
?email=name@otherco.com
Explanation:

Assuming a link (stored in the first element of the links property) to a URL ...
 
http://home.newco.com/products/enquiries.htm#local?email=name@otherco.com
 
...this code would display the search property of it.