JAVASCRIPT DOM(DOCUMENT OBJECT MODEL):-

• Javascript enabled browsers are capable of recognizing individual objects in an HTML page, after the page has been rendered in the browser, because the Javascript enabled browser recognizes and uses the Document Object Model.

• Using the Document Object Model(DOM) Javascript enabled browsers identify the collection of web page object(web page element) that have to be dealt with while rendering an HTML based, web page in the browser window.

• The topmost object in the DOM is the Navigator(i.e the browser) itself. The next level in the DOM is the browser,s window. The next level in the DOM is the Document displayed in browser’s window.

• The DOM hierarchy continues downward to encompass individual elements on a FORM, such as Text boxes, Labels, Radio buttons, Check boxes, Push buttons and so on, which belong to the form

• Javascript’s object hierarchy is mapped to the DOM, which in turn map is mapped to the web page elements in the browser window. Hence, when a web page is rendered in a Javascript enabled browser window, Javascript is capable of uniquely identifying each element in the web page, because major elements of a web page are bound to the DOM.


Window
!-> Document
!-> Anchor
!-> Link
!-> Form
!-> textbox
!-> textarea
!-> radiobutton
!-> checkbox
!-> select
!-> button

Javascript’s DOM.



JAVASCRIPT DOM Objects:-

History object- To maintain a history of the URL’s accessed within a window.

Document object- To access the document currently loaded intoa window. The document object refers to an HTML document that provides content , that is, one that has HEAD and BODY tags.

Event object- To access information about the occurrence of an event.

Window object- To access a browser window or a frame within the window.

Location objects- To represent a URL. It can be used to create a URL object, access part of a URL, or modify an existing URL.

Navigator object- To access information about the browser that is executing the current script.

Screen object- To access information about the size and color depth of a client computer’s screen in which the current browser is running.

EVENT object- It provides constants that are used to identify events.