ZVON > References > DOM2 Reference

getElementsByName (method )

Owning interface and usage:  
HTMLDocument.getElementsByName(elementName)

Member of these other interfaces:  
none

Description:  
With HTML documents, this method returns the (possibly empty) collection of elements whose name value is given by elementName. In XHTML documents, this methods only return the (possibly empty) collection of form controls with matching name. This method is case sensitive.

Parameters:  
DOMString elementName  -  The name attribute value for an element.

Returns:  
NodeList -  The matching elements.

Exceptions:  
none


Example:
JavaScript:
  function getElementsByNameInDocument() {
    var collection = document.getElementsByName('link');
    alert( 'Number of LINK elements in this document: ' + collection.length );
  }
Try it:  
See it:



_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
UNLIMITED Web Hosting by HostDepartment Alojamiento Web UK Domain Names glossary for conference call answering service
MSN VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE