HTMLCollection namedItem() Method
The namedItem() Method is used to return the element with having the specified ID, OR, name or content in an HTML element collection in the document.
Parameters: It contains the name as its parameters values which represent the ID OR name attribute that the user want to return.
Return Value: It returns an Element object, representing the element at with specified ID or name. otherwise, it returns null if the element does not exist.
After clicking on Submit:
Supported Browsers: The browser supported by HTMLCollection NAMEDitem() Method are listed below:
- Google Chrome
- Internet Explorer