I. BACKGROUND
1 , URL Request schematic
2 , the development of the request page method
Web the traditional model (form ). the client sends a request to the server, and the server returns to the entire page, so repeatedly.
in Ajax model, the data is transferred independently between the client and the server. The server no longer returns the entire page.
Before the request data are used form form, but every request once, have to refresh the page again, the user experience is particularly bad, so now with Ajax, can implement partial page request data.
3 , form form
Method Action Enctype
<formAction=""Method=""> <inputtype= "text"name= "username"> <inputtype= "text"name= "Age"> <inputtype= "Submit"value= "Login"> </form>
Method : Get post, etc., get: request data, post input data
Action :Address
enctype: Specifies how the form data is encoded before it is sent application/x-www-form-urlencoded all characters are encoded before sending (default) Multipart/form-dat A (<input type= ' file ' >) does not encode characters. You must use this value when you use a form that contains a file upload control.
Second, Ajax
1 , what is Ajax
Use JavaScript to manipulate XML asynchronously (JSON is now working)
Full Name: Asynchronous JavaScript and XML asynchronous JS and XML
2 , asynchronous, synchronous
In human language: asynchronous (not simultaneous, in order) synchronization
In machine language: Asynchronous (simultaneous) synchronization (not at the same time, in order)
Network Request-ajax