Load
Copy Code code as follows:
$ ("#result"). Load ("aaaa.asp #ccc");
Get
Copy Code code as follows:
$.get ("Aaaa.asp", {action: "Get", Name: "Lulu"},
function (data, textstatus) {
$ ("#result"). HTML (data);
alert (this);
alert (data);
alert (textstatus);
});
Post
Copy Code code as follows:
$.post ("Aaaa.asp", {action: "POST", Name: "Lulu"},
function (data, textstatus) {
$ ("#result"). HTML (data);
});
Ajax
Copy Code code as follows:
$.ajax ({
Type: "Get",
URL: "Http://www.jb51.net/rss",
Beforesend:function (XMLHttpRequest) {
$ (' <div class= quick-alert ' > Data loading, please </div> ' later)
. InsertAfter ($ ("#btn_ajax"))
. FadeIn (' slow ')
. Animate ({opacity:1.0}, 3000)
. fadeout (' Slow ', function () {
$ (this). Remove ();
//});
},
Success:function (data, textstatus) {
$ ("#result"). HTML ("");
$ ("item", data). Each (function (i, Domele) {
$ ("#result"). Append ("<li>" +$ (Domele). Children ("title"). Text () + "</li>");
});
},
Complete:function (XMLHttpRequest, Textstatus) {
Alert ("Load complete!") ");
},
Error:function () {
Request Error Handling
}
});