1, HTML processing is relatively simple, direct output can be.
General use $ ("Jb51div"). innerHTML, etc.
2, JSON format data call
Copy Code code as follows:
$.ajax ({
URL: "/trundle/rawcontentaction.getajaxcontent.act",
Data: "Param1=22",
DataType: "JSON",//The dataType here is the data format returned back Html,xml,json
cache:false,//settings are cached, the default setting is True, and you need to set to false when you need to perform database operations on each refresh
Success:function (data) {
$ (data). each (function (TE, u) {
Alert (TE);
$ ("#content"). Append (u.title+ "</br>");
})
}
})
3, XML format data call
Copy Code code as follows:
$.ajax ({
URL: "/trundle/rawcontentaction.getajaxcontent.act",
Dat A: "param1=22",
DataType: "xml",//The DataType here is the returned data format Html,xml,json
cache:false,//settings are cached, the default setting is true, when you need You need to set to False
Success:function (XML) {
$ (XML) If you need to perform database operations on each refresh. Find ("*"). each (function () {
///This is where the traversed content is , jquery is a
} that can be traversed using XPath
}
})