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 ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus.
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.