This property yields a text string that contains the complete HREF value from the URL if there is one and an empty string if not.
You can redefine the entire HREF content by assigning a new value to this property.
<HTML> <HEAD> </HEAD> <BODY> <A NAME="EXAMPLE" HREF="http://www.mydomain.com:8080/folder/file.html#abcdef">Click here</A><BR> <SCRIPT> document.write(document.links[0].href); </SCRIPT> </BODY> </HTML>
See also: | Anchor.hash, Anchor.href, Location.href, URL, Url object, Url.hash, Url.host, Url.hostname, Url.pathname, Url.port, Url.protocol, Url.search, Url.target |
Prev | Home | Next |
Url.hostname | Up | Url.hreflang |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |