getElementsByName

The getElementsByName() method of the Document object returns a NodeList Collection of elements with a given name attribute in the document.

MDN Reference