Every web page resides inside a browser window which can be considered as an object.
A Document object represents the HTML document that is displayed in that window. The Document object has various properties that refer to other objects which allow access to and modification of document content.
The way a document content is accessed and modified is called the Document Object Model, or DOM. The Objects are organized in a hierarchy. This hierarchical structure applies to the organization of objects in a Web document.
- Window object − Top of the hierarchy. It is the outmost element of the object hierarchy.
- Document object − Each HTML document that gets loaded into a window becomes a document object. The document contains the contents of the page.
- Form object − Everything enclosed in the tags sets the form object.
- Form control elements − The form object contains all the elements defined for that object such as text fields, buttons, radio buttons, and checkboxes.
Advantages of DOM:
- XML DOM provides us platform and independence in languages.
- XML DOM is traversable.
- XML DOM is editable and dynamic. It allows developers to do addition, updating, deletion or move nodes on the tree.
- Robust API for the DOM tree.
- Relatively simple to modify the data structure and extract data.
In this course you will be able to:
- Detect and respond to user actions.
- Alter, show, hide and move objects on a web page.
- Check information inputted into a form.
- jQuery also simplifies complicated tasks like AJAX calls and DOM manipulation.
- jQuery will run exactly the same and produce same output in all major browsers.
- jQuery is free and very easy to include in your projects: just download its latest version from the jQuery website, or use an online Content Delivery Network.
- jQuery is continuously upgraded, maintained and documented by a dedicated community of great developers. This ensures high quality and support on the internet.