Home >Topic List >getelementbyid
getElementById is a DOM method in JavaScript, used to obtain elements in HTML documents based on the element's id attribute. This method accepts a string parameter, the value of the id attribute of the element, and returns the element with that id attribute value. If no matching element is found, null is returned.