Ajax post data is not available, note the settings of Content-type, Post/get
About JQuery data. Online all kinds of access to data, garbled and so on.
Well, I also met today, on the Internet to find a variety of entanglements. Garbled no matter what the first look to get data.
Because the parameters have been passed in jquery Ajax get before, the value of ContentType is not set by default.
Summary: Get mode This is what we call the Get method, the parameters are followed by the URL, not related to Content-type.
1 varSkip = 49;//Number of skipped row2 vartake = 14;//3 functionLoad (Skip, take) {4$ (' #divPostsLoader '). html (' ');5 //send a query to server side to present new content6 $.ajax ({7Type: "Get",8URL: "Ajaximage.ashx",9 data: {skip:skip, take:take},Ten //contentType: "Application/json; Charset=utf-8 ",//(CAN) One //contentType: "Text/xml",//(CAN) A //contentType: "application/x-www-form-urlencoded",//(CAN) - //dataType: "string", -Successfunction(data) { the if(Data! = "") { -$ ('. Thumb ')). append (data); - } -$ (' #divPostsLoader '). empty (); + } - }) +};
Summary: Post mode
1 varSkip = 49;//Number of skipped row2 vartake = 14;//3 functionLoad (Skip, take) {4$ (' #divPostsLoader '). html (' ');5 //send a query to server side to present new content6 $.ajax ({7Type: "Get",8URL: "Ajaximage.ashx",9 data: {skip:skip, take:take},Ten //contentType: "Application/json; Charset=utf-8 ",//(not allowed) One //contentType: "Text/xml",//(not allowed) AContentType: "Application/x-www-form-urlencoded",//(yes) - //dataType: "string", -Successfunction(data) { the if(Data! = "") { -$ ('. Thumb ')). append (data); - } -$ (' #divPostsLoader '). empty (); + } - }) +};
You can also refer to http://www.aikaiyuan.com/6324.html
The ContentType setting type causes AJAX post data to get nothing