Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
namedItem
Collapse the table of content
Expand the table of content

namedItem method

Retrieves an object or a collection from a specified collection.

Internet Explorer 8

 

Syntax


HRESULT retVal = object.namedItem(name, pNode);

Parameters

name [in]

Type: BSTR

A BSTR that specifies the IHTMLAnchorElement::name or IHTMLElement::id property of the object to retrieve.

pNode [out, retval]

Type: IHTMLElement2

The address of a pointer to a variable that receives an IHTMLElement2 interface for the object or collection if successful, or NULL otherwise.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method first searches for an object with a matching IHTMLElement::id attribute. If a match is not found, then the method searches for an object with a matching IHTMLAnchorElement::name attribute, but only on those elements that are allowed a name attribute.

 

 

Community Additions

ADD
Show:
© 2015 Microsoft