What is the DOM? The
Document Object Model (DOM) is an API for HTML and XML documents. It provides a structural representation of the document, enabling you to modify its content and visual presentation. Essentially, it connects web pages to scripts or programming languages. https://developer.mozilla.org/en/DOM
The real DOM Document .getElementById(‘tabs’)
html Element head id=”tabs” Element body Element Element meta title Element .innerHTML div Element Element Element Element ul div div div Element Element Element Element Element Element li li li p p p Element Element Element a a a
. sets up the tabs • showTab() displays a clicked tab's content and highlights the tab. • getFirstChildWithTagName() is a helper function that retrieves the ﬁrst child of a given element that has a given tag name. • getHash() is another short helper function that takes a URL and returns the part of the URL that appears after the hash (#) symbol.