DOM or HTML Content?
Does document object refers to HTML content or DOM to select and manipulate elements? Like will 'getElementById' get the element from HTML content or will it look in the DOM to retrieve element.
Jamie ReardonFront End Web Development Techdegree Graduate 18,941 Points
DOM stands for document object model which is a global object to the browser. Above that, you have the window object.
The getElementById is a method that belongs to the document object. It is used to select an element on a page that has the matching id attribute value. It therefore returns the element and not the html content.