25.16. The Link Object

The Link object corresponds to a hypertext link created through <A HREF=...>. On non-Windows platforms, the AREA client-side image map element also results in Link objects. Links are normally accessed through the document.links array. You cannot name links through the NAME attribute, since using NAME inside an A element creates an anchor for internal hypertext links.

Properties

hash This property gives the “section” part of the hypertext reference and includes the leading # (hash mark). It is read/write.

host This property returns a string of the form hostname:port. It is read/write.

hostname This property returns the hostname. It is read/write.

href This property gives the complete URL. It is read/write.

pathname This property ...

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.