IHTMLDOMAttribute retVal = object.getNamedItem(bstrName);
If the IHTMLDOMAttribute applies to an element but is not specified, this method returns the IHTMLDOMAttribute with the specified name set to an empty string.
If the IHTMLDOMAttribute does not apply to the element and is not specified, then an error is returned.
If the IHTMLDOMAttribute does not apply to the element and is specified, then the IHTMLDOMAttribute with the specified name is returned.
Windows Internet Explorer 8 and later. In IE8 Standards mode, the IHTMLAttributeCollection2::getNamedItem method does not create Attr objects that do not exist in the collection; it returns NULL when an IHTMLDOMAttribute is not found. For more information on IE8 mode, see Defining Document Compatibility.
IHTMLAttributeCollection2::getNamedItem was introduced in Microsoft Internet Explorer 6.