Introducing The Javascript Object Model

All you need to know to get started

Table of contents

No heading

No headings in the article.

When you write scripts, you need to make use of JavaScript objects to manipulate the components of a web page. For example, to validate whether the user has entered a value in the text field in a form, you need to reference the particular text field and check it's value. The text field is treated as an object in JAVASCRIPT. These are the hierarchy of JavaScript objects.

  1. Navigator
  2. Window
  3. Array
  4. Date
  5. Math
  6. String

On the window object we have the . Document . Frames . Location . History

On the document object we have the . Anchor . Image . Form . Link

On the form object we have the . Button . Radio . Reset . Text . Password . Checkbox . Select . Submit . Textarea . Hidden

The hierarchy show in the preceding text shows the principle of containership. For example, the button and check box items contained within the form object. The form object, in turn, is contained within the document object which is contained within the top-level window object.