ZVON > References > DOM1 Reference

getElementsByTagName (method)

Owning interface and usage:  
Document.getElementsByTagName(tagName)

Member of these other interfaces :  
none

Description:  
Returns a NodeList containing all Elements of the given name in the same order as they appear in the source document.

Parameters:  
DOMString tagName  -  The name of the tag to match on. The special value "*" matches all tags.

Returns:  
NodeList -  A new NodeList object containing all the matched Elements.

Exceptions:  
none


Example:
JavaScript:
  var collection = document.getElementsByTagName('LINK');
  var output = collection[1].getAttribute('rel');
Output:
desired your browser
stylesheet