DOM

Methods

getElementById

There are other methods, such as the following one:

document.getElementsByTagName("DIV")

It would summon all of the div tags in a page. We can put any sort of tag into the formula, and thus call everyone of that sort, all at once.

Through our lesson, we shall concentrate on the first method introduced here, as it can be so useful:

document.getElementById("id")

Next >


< Previous

[Page Top]

Introduction to DOM, by Dr Sam
copyright | contact
published by OxfordU.net

[An alternative, straight-text version is also available.]