The DOM (Document Object Model)

Now before we move any further there are few things that you should know.

The DOM

JavaScript works only with browser. It is a web language and can be used for creating web applications only.

The browser has a definite components and it arranges all its components into a hierarchical tree structure. For example, the topmost component of browser is 'window'. After that the 'document' and so on. This hierarchical structure is called Document Object Model(DOM).

With JavaScript DOM objects, you can access and modify any DOM component.

Finally here is a view of DOM objects. It will come in handy. Just have a closer look. No need to cram it.

'window' is the topmost component of DOM. Everything else is a sub-component of window. 'document' is sub-divided into forms, anchors, links and images.

Objects in JavaScript

Also everything in javascript is an object. Even simple variables. If you are not familier with objects then its ok. We will be covering it later. Just note the point that everything in JavaScript is an object.

<< Inserting JavaScript Displaying Output >>