Ajax generally do two if judgments, to determine whether the readystate is equal to 4, that is, the response completed, status is equal to 200.
1. Ajax (asynchronous JavaScript and XML)
Ajax definition: Allows the client browser to communicate with the server, without refreshing the current page of the technology for Ajax technology.
2, do not refresh the page, with the server communication technology has Ajax,flash,javaapplet, framework (Iframe,frameset), XMLHttpRequest.
Note: The framework is to put more than one page in the frame, is a cross page operation, and the real does not refresh the page, and the server communication is different. Just refresh the page in one frame and the overall page does not refresh.
3, the core of Ajax: JavaScript object XMLHttpRequest.
4, Ajax is not a new technology, is a combination of various technologies, including javascript,xhtml,css,dom,xml,xmlhttprequest.
5, AJAX implementation steps:
1) Create XMLHttpRequest Object
2) Establish the connection
3 Send request data to server side
4 The server responds to the client
There are two if judgments to determine whether the readystate is equal to 4, that is, the response completed, status is equal to 200.