Example for adding JQuery AJAX parameters: jqueryajax
Context
Type: Object
This object is used to set the context of Ajax-related callback functions. That is to say, let this in the callback function point to this object (if this parameter is not set, this points to the options parameter passed when this AJAX request is called ). For example, if you specify a DOM element as the context parameter, the context of the success callback function is set to this DOM element.
Like this:
$. Ajax ({url: "test.html", context: document. body, success: function (){
$ (This). addClass ("done ");
}});
JsonpCallback
Type: String
Specify a callback function name for the jsonp request. This value is used to replace the random function name automatically generated by jQuery. This function is mainly used to make jQuery generate a unique function name, which makes it easier to manage requests and conveniently provide callback functions and error handling. You can also specify the callback function name when you want the browser to cache the GET request.
Xhr
Type: Function
You need to return an XMLHttpRequest object. ActiveXObject in IE and XMLHttpRequest in other cases by default. Used to override or provide an enhanced XMLHttpRequest object. This parameter is unavailable before jQuery 1.3.
Timeout
Type: Number
Set the request timeout (in milliseconds ). This setting overwrites the global setting.
Parameters passed by jquery ajax
Type: "POST"
Because type is post ~ Asp can be processed just like a normal form commit .. The transmitted transmission is directly received using request ~
In your case ~ The result you have processed ~
Finally, output 000 to 002 and so on ..
Jquery ajax example
This example is very troublesome. It involves html pages, php pages, and databases. It is recommended that you take a look at the jquery manual, which describes how to use ajax, as well as examples.
Data is sent to the php end through ajax, php is processed, and then sent to ajax. After ajax receives the data, it is the common variable in js, and js places the data to the corresponding location on the page.