JavaScript tutorial - DOM objects and methods

Navigation

Skip navigation.

Site search

Site navigation

JavaScript tutorial

Printing

Other tutorials

DOM objects and methods

This gives all properties, collections and methods of the W3C DOM that can be reliably used in all major DOM browsers, as well as document.styleSheets, which is much less reliable, but useful if it is available.

Key

Each can be clicked for more information.

Collections will also have the length property, giving the number of entries in that collection.

The document node

Creating nodes

To walk the DOM tree

DOM support

All nodes

To walk the DOM tree

Attaching, copying or removing nodes

Node information

Element node attributes

Element node style

Element node size and position (not standardised)

Table and associated nodes

In addition to the normal node functionality, nodes belonging to tables have extra functionality, specially designed to work with the layouts of tables.

To walk the DOM tree

Attaching, copying or removing nodes

Node information

Stylesheets (if supported)

Events

Adding and removing event listeners

Creating event objects

Preparing event objects

Firing events

Additional event object methods and properties

As well as the traditional event object properties, some more are provided by DOM events (or IE events) capable browsers.

Last modified: 14 November 2007

  1. Previous
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.