Link href property
Link Object
Definition and Usage
The href property is a read-write string that sets or returns the complete URL of the currently displayed document.
Syntax
Set the href property:
linkObject.href="
URL
"
Return the href property:
linkObject.href
Browser support





All major browsers support the href property.
Example
Example
Toggle the style sheet when a button is clicked:
My website homepage
Try it »
Link Object