This file file serves as your book's preface, a great place to describe your book's content and ideas.

The HTML DOM (Document Object Model)

When a web page is loaded, the browser creates a Document Object Model of the page.

The HTML DOM model is constructed as a tree of Objects.

With the object model, JavaScript gets all the power it needs to create dynamic HTML:

HTML DOM Methods

HTML DOM methods are actions you can perform (on HTML Elements).

HTML DOM properties are values (of HTML Elements) that you can set or change.

The HTML DOM Document Object

The document object represents your web page.

If you want to access any element in an HTML page, you always start with accessing the document object.

// Find an element by element id
document.getElementById(id)    

// Find elements by tag name
document.getElementsByTagName(name)    

// Find elements by class name
document.getElementsByClassName(name)

results matching ""

    No results matching ""