$. ajax ((
type: "GET",
url: "test.js",
dataType: "script"
))
2.post data
$. ajax ((
type: "POST",
url: "xxxx",
data: "name = zhaoaiqing & age = 25",
success: function (msg) (
alert (msg);
)
));
3. $. AjaxSetup (settings) set the overall variable ajax
$. ajaxSetup ((
url: "xxxx",
global: false,
type: "POST"
));
4. $. AjaxTimeout (time) set the overall time for ajax request
$. ajaxTimeout (1000);
5.get data to a server-side
$. get ( "xxxx",
(Name: "zhaoaiqing", age: "25"),
function (msg) (
alert (msg)
)
);
6.get data to a server-side return value is the best format to use json
$. getJSON (url, params, callback)
7. $. GetScript (url, callback) download script file
$. getScript ( "xxx.js", function () (
alert ( "success");
));







