1, ajax What is that?
xml JavaScript and Asynchronous
ajax is a technology used to improve the user experience, and its essence is to use the browser's built
a special object (XMLHttpRequest object) sends a request to the server while sending the request,
the browser will not destroy the current page, the user can still do other operations on the current page.
The server sends back is generally not a complete new page, but part of the data
(text or xml document), in the browser, you can use the data to update the current page section.
The whole process, no page refresh, do not interrupt the user's actions.
2, how to get the XMLHttpRequest object?
Because XMLHttpRequest is not standardized, therefore, to distinguish the browser.
getXhr function () {
var XHR = null;
IF (window.XMLHttpRequest) {
// browser ie non
XHR = new new the XMLHttpRequest ();
} {on ELES
XHR = new new ActiveObject ( 'the Microsoft.