Retrieves a collection of all A objects that specify the href property and all AREA objects in the document.
Syntax
[ collLinks = ] document.links [ oObject = ] document.links(iIndex)
Possible Values
collLinks Array of A objects. oObject Reference to an individual item in the array of elements contained by the object. iIndex Required. Integer that indicates the zero-based index of the item to be returned.
Members
Remarks
For A objects to appear in the collection, they must have a name and/or id property.
Example
This example shows how to display the HREF attribute of the third link defined in the document.
alert(document.links(2).href);
Applies To