Ajax Full Name: Asynchronous JavaScript and XML, asynchronous JavaScript and XML.
Ajax is not a language, it is a technology that can update parts of a Web page without reloading the entire page.
(interacting with the background for partial updates, asynchronous updates)
Synchronous and asynchronous :
synchronization (before the advent of Ajax): The client initiates the request, the server processes and responds to the request, during which time the client waits for a response from the servers, and the client re-loads the page after the server-side response, and if you have an error, you can only initiate the request again and wait ...
< Span style= "FONT-SIZE:14PX; line-height:28px ">
< Span style= "FONT-SIZE:14PX; line-height:28px "> async (after the advent of Ajax) : xmlhttprequest the appearance of the background and the server without reloading the page in the case of data exchange (and part of the Web page update).
< Span style= "FONT-SIZE:14PX; line-height:28px ">
xmlhttprequest
< Span style= "FONT-SIZE:14PX; line-height:28px "> Instantiating Xhr object:
" Pre code_snippet_id= "669033" snippet_file_name= "blog_20150518_1_9361936" name= "code" class= "HTML" style= " line-height:28px; " ><span style= "FONT-FAMILY:SIMSUN;FONT-SIZE:12PX;" >var request </span><span style= "Font-family:microsoft Yahei, Hiragino Sans GB, Helvetica, Helvetica Neue, Microsoft Jacob Black, Tahoma, Arial, sans-serif;font-size:14px; >= </span><span style= "FONT-FAMILY:SIMSUN;FONT-SIZE:12PX;" >new XMLHttpRequest (); </span>
< Span style= "FONT-SIZE:14PX; line-height:28px "> Consider browser compatibility:
var request;if (window. XMLHttpRequest) {request = new XMLHttpRequest ();//ie7+,firefox,chrome,opera,safari ...} Else{request = new ActiveXObject ("Microsoft.XMLHTTP");//IE6,IE5}
Ajax knowledge Notes--Getting started, synchronous and asynchronous, XHR