Load
Copy codeThe Code is as follows:
$ ("# Result"). load ("aaaa. asp # ccc ");
Get
Copy codeThe Code is as follows:
$. Get ("aaaa. asp", {action: "get", name: "lulu "},
Function (data, textStatus ){
$ ("# Result" pai.html (data );
// Alert (this );
// Alert (data );
// Alert (textStatus );
});
Post
Copy codeThe Code is as follows:
$. Post ("aaaa. asp", {action: "post", name: "lulu "},
Function (data, textStatus ){
$ ("# Result" pai.html (data );
});
Ajax
Copy codeThe Code is as follows:
$. Ajax ({
Type: "get ",
Url: "http://www.jb51.net/rss ",
BeforeSend: function (XMLHttpRequest ){
// $ ('<Div class = "quick-alert"> loading data, please wait </div> ')
//. InsertAfter ($ ("# btn_ajax "))
//. FadeIn ('slow ')
//. Animate ({opacity: 1.0}, 3000)
//. FadeOut ('slow', function (){
// $ (This). remove ();
//});
},
Success: function (data, textStatus ){
$ ("# Result" example .html ("");
$ ("Item", data). each (function (I, domEle ){
$ ("# Result"). append ("<li>" + $ (domEle). children ("title"). text () + "</li> ");
});
},
Complete: function (XMLHttpRequest, textStatus ){
// Alert ("Loading complete! ");
},
Error: function (){
// Handle request errors
}
});