Javascript document object can change the innerText property of the HTML elements like span, div, and paragraph etc using getElementById method.
Javascript getElementById method can be accessed using the document object of DOM. getElementById method returns the reference to the First HTML element
Javascript getElementsByName returns an array collection of HTML elements of specified name. Here we will use the Javascript for loop through the array elements returned by the getElementsByName method.
Javascript DOM provides a getElementsByName method that can be accessed using the document object. getElementsByName method returns the array collection of HTML document elements present in the HTML web page ...