Know the XMLHttpRequest work flow, we can see, XMLHttpRequest is completely used to send a request to the server, and it is also limited to the role, but its role is to realize the key to the whole ajax, ajax simply because the two processes are , issued a request and responding to requests. And it is a client technology. XMLHttpRequest is the deal with the server-side and client communication will be such a problem so important.
Now, we can perhaps ajax principle have an understanding. We can put server-side as a data interface, it is a return flow in plain text, of course, this text can flow are XML format, can be Html, could be the Javascript code can also be just a string. At this time, XMLHttpRequest request to the server-side of this page, server-side version of the results will be written into the page, this and the general flow of web development are the same, difference is that the client at the results of asynchronous access is not directly displayed in the page, but javascript to deal with first, and then displayed on the page. As popular now a lot of ajax control, such as magicajax, to return DataSet and other data types, but this process will be the result of the package, in essence, they do not have much difference.