HBCMS更多的中文手册参考:

links Collection

DHTML文档教程

Retrieves a collection of all a objects that specify the href property and all area objects in the document.

dhtml语法

[ oColl = ] document.links
[ oObject = ] document.links(iIndex)

DHTML可能的值

oCollArray of a objects.
oObjectReference to an individual item in the array of elements contained by the object.
iIndexRequired. Integer that specifies the zero-based index of the item to be returned.

Members Table

PropertyDescription
length Sets or retrieves the number of objects in a collection.
MethodDescription
item Retrieves an object from the all collection or various other collections.
nameditem   Retrieves an object or a collection from the specified collection.
tags Retrieves a collection of objects that have the specified HTML tag name.
urns Retrieves a collection of all objects to which a specified behavior is attached.

remarks

for a objects to appear in the collection, they must have a name and/or id property.

DHTML代码范例

This example shows how to display the HREF attribute of the third link defined in the document.

alert(document.links(2).href);

是否符合公共标准

This collection is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

document