Programmer's Guide > Interfaces > ADocument interface > getElementsByAttribute method
  
getElementsByAttribute method
Returns a NodeList of all descendant Elements that match the given attribute name and attribute value, in the order in which they are encountered in a pre-order traversal of this Document tree.
getElementsByAttribute(name, value, selector)
Parameters
Stringname
Specifies the name of the attribute to match. The value "*" matches all attribute names.
Stringvalue
Specifies the value of the attribute to match.
ATIElementAttributeSelectorselector
Specifies how the attribute value should be matched. When selector is 0, the value parameter is ignored. When selector is 1, only the elements that match both the name and the value are included.
Returns
NodeList. A list of matching element nodes.
Throws
DOMException SYNTAX_ERR: If selector is invalid.
INVALID_CHARACTER_ERR: If name is namespace qualified.