This article mainly describes the introduction of Ajax, the basic knowledge of Ajax, you really plenary? After reading this article you will be able to understand the meaning of Ajax in general. Now read this article.
Introduction to Ajax first article
Article summary: This article mainly describes what Ajax is, the role of Ajax, and the process of Ajax requests, and a simple example of an Ajax in the analysis of the article.
The concept of Ajax
Here is the main introduction of my personal understanding of Ajax, if you want to understand the detailed concept of Ajax, you can click the following link:
The concept of detailed Ajax
Ajax: The full name is asynchronous JavaScript and XML, mainly for some Web pages without refreshing update data. The role of Ajax: primarily for data interaction. The advantages of Ajax: 1. Save user's operation, time, improve user experience, reduce data request. 2. Transfer to get data. (Want to see more on the topic.alibabacloud.com column to learn)
The request flow of Ajax
In our daily browsing of the page, there are generally the following steps 1. Open Browser 2. Enter the address on the browser 3. Submit a request 4. Wait for the server to return content
The process of Ajax execution has a similar meaning to the process described above.
1. Create an Ajax object----->xmlhttprequest (), similar to opening the browser. 2. Call the Open () method of the Ajax object,----> enter the URL to be accessed in the browser. 3. Call the Ajax object's send () method,----> Commit. 4. Wait for the server to return data.
Analysis of a simple AJAX program.
The main function of the program is to define a button in the page, when the button is clicked, will be implemented without refreshing the background to get a text information, and output it in the browser. source code of the program:
Ajax.html
<! DOCTYPE html>
This is the end of this article (want to see more on the Topic.alibabacloud.comAJAX User manual section of the study), there are questions can be in the message below the question.