getElementsByName method
Gets a collection of objects based on the value of the IHTMLDOMAttribute2::name or IHTMLElement::id attribute.
Syntax
IHTMLElementCollection retVal = object.getElementsByName(v);
Parameters
v [in]
Type: BSTRA BSTR that specifies the value of a IHTMLDOMAttribute2::name attribute.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.2
Remarks
When you use the IHTMLDocument3::getElementsByName method, all elements in the document that have the specified IHTMLDOMAttribute2::name attribute or IHTMLElement::id attribute value are returned.
Elements that support both the IHTMLDOMAttribute2::name attribute and the IHTMLElement::id attribute are included in the collection returned by the IHTMLDocument3::getElementsByName method, but elements with a IHTMLDOMAttribute2::name IHTMLDocument2::expando are not included in the collection; therefore, this method cannot be used to retrieve custom tags by name.