Ajax Basics Tutorial (2)-Using the XMLHttpRequest object 2.8 DOM

Source: Internet
Author: User
Tags object model

We've been talking about DOM, and if you haven't done too many client work, you probably don't know what DOM is. DOM is a consortium protocol that can access and modify the content and structure of a document in a platform-and language-independent manner. In other words, this is a common way to represent and process an HTML or XML document.

It is important that the design of the DOM is based on the specification of the Object Management Organization (OMG) and can therefore be used in any programming language. It was originally thought to be a way to make JavaScript portable between browsers, but Dom's application has gone far beyond that.

Dom is actually an object model that is described in an object-oriented fashion. The DOM defines the objects that are required to represent and modify documents, the behavior and properties of those objects, and the relationships between those objects. The DOM can be thought of as a tree representation of the data and structure on the page, but the page may not, of course, be implemented in the same way as the tree. Suppose you have a Web page, as shown in code listing 2-5.

Code Listing 2-5 Simple tables

<table>
<tbody>
<tr>
<td>Foo</td>
<td>Bar</td>
</tr>
</tbody>
</table>

You can draw the DOM of this simple table, as shown in Figure 2-6.

The good thing about the DOM specification is that it provides a standard way to interact with documents. If there is no dom,ajax the most interesting aspect of it may not exist at all. Because DOM not only allows you to traverse the DOM tree, you can also edit the content so that you can create extremely dynamic pages.

Back to "Ajax Basics Tutorial-Directory"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.