Export (0) Print
Expand All

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: BSTR

A BSTR that specifies the value of a IHTMLDOMAttribute2::name attribute.

Standards information

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.

See also

About the W3C Document Object Model

 

 

Community Additions

ADD
Show:
© 2014 Microsoft