JavaScript » Link » href

Syntax:
object.href

The href property is a string specifying the entire URL, and of which all other Link properties are substrings.

href is a property of both the Link and the Location objects and is a string specifying the entire URL, of which all other properties are substrings. If you wish to change a location, you can safely do so by setting the href property.

Examples

Code:
document.write(document.links[0].href)
Output:
http://home.newco.com/products/enquiries.htm#local?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 href property of it.