links Collection

MS Office DHTML, HTML & CSS

links Collection


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

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.

document


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.