Dealing with the DOM

Objectives

JavaScript.info tutorials on the DOM

DOM basics

References to nodes

Important node properties

Accessing node attributes

Modifying the DOM

Using document.write()

Searching for elements in the DOM

Referring to form and table elements

Referring to styles

DOM Explorer demonstration

See DOMExplorer.html for a demonstation of how you can traverse the DOM in JavaScript. Use view source on that page to see how the JavaScript code is written.

You can also turn the DOM Explorer code into a GreaseMonkey script to display the DOM for a web page. The code to do that for every page you visit on the web server we use ofr class is at: domExplorer.user.js.

DOM tutorial with practice