XMLHttpRequest and Ajax

Source: Internet
Author: User

In the previous article, I practiced how to use IFRAME to refresh Part of the page. However, when I clicked the button, I asked the server to refresh the IFRAME source code page, which is ugly.

What we need is to send refresh requests, receive data, implement listening and other functions as needed (asynchronously) in the page code. This is Ajax. While Ajax is based on something called XMLHttpRequest,

It is a JavaScript Object (xml dom object), but since X in Ajax involves XML, I think I should first understand the relationship between the browser and XML. The information here is:XML Parser.

Next, let's go over the basic concepts page and go back to several sections to introduce the XMLHTTPRequest object. There is such a saying:

 

The XMLHTTPRequest object isDeveloper's dreamBecause you can:

  • Update the webpage without reloading the page
  • Request data from the server after the page has been loaded
  • Receive data from the server after the page is loaded
  • Send data to the server in the background

All modern browsers support XMLHttpRequest objects.

 

Haha ..... The worst thing is that there are two different implementation methods for XMLHttpRequest objects between ie5, 6, IE7, Firefox, and other browsers. IE6 is still rampant in the Internet world today, this is really a big headache ......

 

Sorry, I copied it without looking at it. There is too much content. Just paste the link here:

From IBMMaster Ajax Series

Ajax training series from Lao Zhao:

Ajax training lecture 1: Ajax Basics

Ajax training Lecture 2: using the Ajax framework (I)

Ajax training Lecture 2: using the Ajax framework (below)

Some of my views: Comparison of Ajax frameworks

After reading this, it is estimated that we can almost do something... For more information, see.

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.