1. What is Ajax
ajax:asynchronous JavaScript and XML ( asynchronous js and XML)
It can be used with the server ( asynchronous / Synchronous ) One of the techniques of interaction .
the language carrier of Ajax is JavaScript.
Maximum features: page does not refresh
Receive Server return information
what information can Ajax receive?
A: The information that the browser can receive can be received by Ajax, such as strings,HTML tags,css style content,xml content , JSON content and so on.
4.
Ajax requests for Get and post methods
Ajax Object . Open (get/post, request address );
4.1 The difference between the two
① The amount of data passed to the server,get up to 2k
there is no limit to the post principle,php.ini is limited to 8M
② security,post transfer data is more secure
③ pass data in a different form
Get method passes parameters in the form of a request string behind a URL address
HTTP// URL /index.php? Name=tom&age=23&addr=beijing
The blue part is the request string, which is the " name - value " pair, with the & symbolic connection in the middle.
The post method is to send the form form data to the request and pass it to the server in XML form .
in JavaScript, information such as special symbols can be encoded by encodeURIComponent () .
Post
20180822 Ajax Post Method request