[This documentation is preliminary and is subject to change.]
HRESULT retVal = object.namedItem(name, );
There are no standards that apply here.
- name [in]
- pdisp [out, retval]
Type: IDispatchThe address of a pointer to a variable that receives an IDispatch interface for the object or collection if successful, or NULL otherwise.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
The IHTMLElementCollection3::namedItem method was introduced in Microsoft Internet Explorer 6
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 IHTMLDOMAttribute2::name attribute, but only on those elements that are allowed a name attribute.
Build date: 6/6/2012