IHTMLElementCollection::itemIHTMLElementCollection::item*
*Contents  *Index  *Topic Contents
*Previous Topic: IHTMLElementCollection::get__newEnum
*Next Topic: IHTMLElementCollection::tags

IHTMLElementCollection::item


HRESULT item(
    VARIANT name,
    VARIANT index,
    IDispatch **pdisp
);

Retrieves an object or a collection from the given collection. The name determines which action to take.

name
VARIANT structure containing a string or value specifying the object or collection to retrieve. If this parameter is a number, the method returns the object in the collection at the given position, where the first object has value 0, the second has 1, and so on. If this parameter contains a string, the method returns a collection of objects, where the value of the name or id property for each object is equal to the string.
index
VARIANT structure containing a value specifying the position of an object to retrieve. This parameter is used when name is a string. The method uses the string to construct a collection of all objects that have a name or id equal to the string, then retrieves from this collection the element at the position specified by index.
pdisp
Address of the IDispatch interface of the collection or object.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.