10.07.2017 Views

javascript_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

28. DOM<br />

Javascript<br />

Every web page resides inside a browser window which can be considered as an<br />

object.<br />

A Document object represents the HTML document that is displayed in that<br />

window. The Document object has various properties that refer to other objects<br />

which allow access to and modification of document content.<br />

The way a document content is accessed and modified is called the Document<br />

Object Model, or DOM. The Objects are organized in a hierarchy. This<br />

hierarchical structure applies to the organization of objects in a Web document.<br />

<br />

<br />

<br />

<br />

Window object: Top of the hierarchy. It is the outmost element of the<br />

object hierarchy.<br />

Document object: Each HTML document that gets loaded into a window<br />

becomes a document object. The document contains the contents of the<br />

page.<br />

Form object: Everything enclosed in the ... tags sets the<br />

form object.<br />

Form control elements: The form object contains all the elements<br />

defined for that object such as text fields, buttons, radio buttons, and<br />

checkboxes.<br />

Here is a simple hierarchy of a few important objects:<br />

325

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!