Understanding the html document object model, Programming Languages

Assignment Help:

At the core of DHTML is the Document Object Model, or DOM, which represents the HTML or XML of a Web page that is displayed in a browser. The Document Object Model that represents HTML content is referred to as the HTML DOM, and the Document Object Model that represents XML content is referred to as the XML DOM. Throughout this book, you have created Web pages that conform to XHTML. Because XHTML documents are just another type of XML document, you can manipulate them with both the HTML DOM and the XML DOM. But which is preferable?

The W3C formally recommends using the XML DOM instead of the HTML DOM. Nonetheless, it's easier to use the HTML DOM with basic types of DHTML techniques, such as those discussed in this and the next chapter. Keep in mind, however, that you must use the XML DOM when using some advanced JavaScript techniques, such as AJAX, which is discussed in Chapter 12.

Each element on a Web page is represented in the HTML DOM by its own object. The fact that each element is an object makes it possible for a JavaScript program to access individual elements on a Web page and change them individually, without having to reload the page from the server.

Although the individual technologies that make up DHTML have been accepted standards for some time, the implementation of DHTML has evolved slowly. One of the main delays in implementation has to do with the DOM. Earlier versions of Internet Explorer and Navigator included DOMs that were almost completely incompatible with each other. This meant that you needed to write different JavaScript code sections for different browsers. At the time of this writing, Mozillabased Web browsers including Firefox, Internet Explorer 5.0 and higher, and Netscape 6 and higher are all compatible with a standardized version of the DOM, Level 3, that is recommended by the World Wide Web Consortium (W3C).

When it comes to Web page authoring, the most important part of the HTML DOM is the Document object. Through the Document object you can access other objects that represent elements on a Web page. Throughout this book, you have used the HTML DOM to access and manipulate form elements. Similarly, you can use JavaScript to manipulate the images on a Web page through the Image object. The value you assign to an element's name attribute becomes the name of an associated Image object. In order to access an Image object named companyLogo, you must append the image name to the Document object as follows: document.companyLogo. (You will learn how to work with the Image object in the next section.)


Related Discussions:- Understanding the html document object model

Python, please decode the following as it is answer for my assisgnment for ...

please decode the following as it is answer for my assisgnment for python: Ñò üOLOc  @ s‚ d „ Z d „ Z g Z xYe oQe ƒ e d ƒ i ƒ Z e d j oI e d

ActionScript, looking for help with a flash game assignment.

looking for help with a flash game assignment.

Type of linear programming - dea, Type of Linear Programming - DEA The ...

Type of Linear Programming - DEA The Express Dry Cleaners currently has four locations in the Chicago area and willing be opening the fifth in the very near future.  Mr. James,

Pascal program, Pascal program: Exactly what you need to do to generat...

Pascal program: Exactly what you need to do to generate your empirical data is specific to your individual assignment. However, some rules apply to all of you: 1. The gener

I need to do coding for the last three question, i attached the assignment ...

i attached the assignment document only i need your help with following three parts: accessible areas, accessible cul-de-sacs that are all connected, entry-exit path with no in

Use case diagram incremental development, Introduction This assignment ...

Introduction This assignment builds on your application, produced in Assignment 1, which holds a list of cabins, which can be either read in from a text file or just hard coded

Software tools for structuring complex program, This assignment begins soft...

This assignment begins software tools and techniques for structuring complex programs. Use it to become familiar with these facilities, and ensure you use the speci?ed concepts in

Shell script to combine 2 files horizontally and vertically, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Program to built book recommendation system, 1 Problem Description The...

1 Problem Description The task of the assignment is to build a book recommendation system for Auer Libraries. The system is to be implemented in Prolog and as the owners of t

C language, write a program to find the output 1 ...

write a program to find the output 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd