First, the principle of Ajax
Introduction to Ajax
-Asynchronous JavaScript and XML asynchronous JavaScript and XML
-Ajax is a technique used to improve the user experience, essentially by using the XMLHttpRequest object to send requests asynchronously to the server
-The server returns part of the data instead of a full page, changing the local content in the page without refreshing the page
How Ajax Works
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/7D/wKiom1cCIImzMw87AACG0sluUxE183.png "title=" Web.png "alt=" Wkiom1cciimzmw87aacg0sluuxe183.png "/>
Get Ajax objects
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/7A/wKioL1cCIXWTg0WCAAFd7tLlTog464.png "title=" Web.png "alt=" Wkiol1ccixwtg0wcaafd7tlltog464.png "/>
Second, Ajax object properties and methods
Properties and methods for asynchronous objects
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/7A/wKioL1cCIiXw2igvAAImuFRu1QQ644.png "title=" Web.png "alt=" Wkiol1cciixw2igvaaimufru1qq644.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/7D/wKiom1cCIanSV730AAFZQ3eZPMA895.png "title=" Web.png "alt=" Wkiom1cciansv730aafzq3ezpma895.png "/>
onReadyStateChange
-onReadyStateChange: Binds an event handler function to handle the ReadyStateChange event
-Note: When the value of the readystate of an Ajax object changes, for example, from 0 to 1, a ReadyStateChange event is generated
ReadyState
-ReadyState: A total of 5 values, respectively, are 0,1,2,3,4, respectively, representing the status of the Ajax object and the server communication
-for example, a value of 4 o'clock indicates that the Ajax object has obtained all the data returned by the server
Summary: This chapter focuses on Ajax (Ajax principles, Ajax object properties and methods)
This article from the "Flying Ants" blog, declined to reprint!
JavaScript Ajax-1 Ajax (Ajax principles, Ajax object properties and methods)