Chapter 13. The Document Object Model
The DOM is also an extremely detailed resource from which you can determine just about anything about the content and layout of a web page. Every single element of the page is described in the model, including tables, forms, and text. Very detailed information about those elements is also accessible, including the styling of objects, the sizes and positions of nodes, whether or not there are scrollbars on elements, where hyperlinks point to, and so on. It even provides a complex event model (which you've already looked at) that lets you add a layer of interactivity to your pages — making them more than mere static canvases.
I've already introduced you to many aspects of the DOM, including the
document object, DOM nodes, element IDs, and so on. For example, you've already looked at how events let you tap into key moments of interaction on a page. Now you'll complete your understanding of how to query a document, navigate it, and change it. You'll also ...