HyperLink object (Object/HTML)

Another name for the Url object.

Availability:

JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Inherits from:Element object
JavaScript syntax:-myHyperLink = myDocument.links[anIndex]
Event handlers:onClick, onDblClick, onHelp, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp

In Netscape, links are stored in Url objects. These are distinctly different to Anchor objects.

MSIE does not distinguish between the two but since there is no constructor, it is hard to know what object type they are. Generally they are assumed to be Url objects.

Because the class name is Url in Netscape, the link objects are discussed in detail under that lexical topic location.

MSIE supports a LINK object class but this is a special object that stems from a styleSheet item. It doesn't support all the properties that a Url object does and is probably more concerned with managing the appearance of a Url object on the screen.

See also:Area object, Element.all[], LinkArray object, URL, Url object

Event nameJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
onClick1.0 1.01.0 1.02.0 2.03.0 3.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onDblClick1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onHelp n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/aWarning
onKeyDown1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onKeyPress1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onKeyUp1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onMouseDown1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onMouseMove1.2 1.23.0 3.04.0 4.04.0 4.0 n/a n/a n/a n/a n/a4.0 4.0Warning
onMouseOut1.1 1.13.0 3.03.0 3.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onMouseOver1.0 1.01.0 1.02.0 2.03.0 3.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning
onMouseUp1.2 1.23.0 3.04.0 4.04.0 4.03.0 3.0 n/a n/a n/a n/a4.0 4.0Warning

Inheritance chain:

Element object, Node object