$. Post (URL, Params, callback)
Mount a remote page using HTTP POST
Return Value:XMLHttpRequest
Parameters:
- URL (string): the URL address of the loaded page.
- Params (MAP): (optional) Key/value pair parameter sent to the server.
- Callback (function): (optional) function executed when data loading is complete.
Example:
$. Post ("test. cgi ");
Example:
$. Post ("test. cgi", {name: "John", time: "2 "});
Example:
$. Post ("test. cgi", function (data) {alert ("data loaded:" + Data );});
Example:
$. Post ("test. cgi ", {name:" John ", time:" 2 "}, function (data) {alert (" data loaded: "+ Data );});
$. Post (URL, Params, callback)
Load a remote page using an http post request.
This is an easy way to send a simple POST request to a server without having to use the more complex $. ajax function. it allows a single callback function to be specified that will be executed when the request is complete (and only if the response has
Successful response code). If you need to have both error and success callbacks, you may want to use $. Ajax.
Return Value:XMLHttpRequest
Parameters:
- URL (string): the URL of the page to load.
- Params (MAP): (optional) Key/value pairs that will be sent to the server.
- Callback (function): (optional) a function to be executed whenever the data is loaded successfully.
Example:
$. Post ("test. cgi ");
Example:
$. Post ("test. cgi", {name: "John", time: "2 "});
Example:
$. Post ("test. cgi", function (data) {alert ("data loaded:" + Data );});
Example:
$. Post ("test. cgi ", {name:" John ", time:" 2 "}, function (data) {alert (" data loaded: "+ Data );});