Click to return to the DHTML, HTML     
imports Collection     mimeTypes Collection     DHTML Collections    
Web Workshop  |  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:

document



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.