Four types of Jquery Ajax types: jqueryajax
What does Ajax type fill in? Generally, get and post are used. So what are the other two?
$.ajax({ url: 'http://www.cnblogs.com/youku/', type: '', data: {}});
(Default: "GET") Request Method ("POST" or "GET"). The default value is "GET ". Note: Other HTTP request methods, such as PUT and DELETE, can also be used, but are only supported by some browsers.
Here is the online explanation
1. a GET request sends a data request to the database to obtain information. The request is like a select operation in the database. It is only used to query the data and does not modify or add data, does not affect the content of the resource, that is, the request does not produce any side effects. The results are the same no matter how many operations are performed.
2. Unlike GET, a PUT request sends data to the server to change the information. The request is used to modify the data content just like the update operation of the database, however, no data types are added. That is to say, no matter how many PUT operations are performed, the results are not different.
3. Similar to PUT requests, POST requests send data to the server, but the request changes the data type and other resources, just like the insert operation in the database, will create a new content. Almost all the currently submitted operations use POST requests.
4. a delete request, as its name implies, is used to delete a resource, which is like a DELETE operation in a database.
Simply put
1. Create POST/url
2. DELETE/url/xxx
3. PUT/url/xxx update
4. View GET/url/xxx
$.ajax({ url: 'http://www.cnblogs.com/youku/', type: 'DELETE', data: {}});