我用的还是传统的asp.net网页编程,前台用的JQuery,后台是asmx的webservice,我发现同样是ajax,get和post,同样的 dataType: "json", contentType: "application/json", data的写法是不一样的一个要序列化JSON.stringify(XXX:XX)一个不要,为什么呢?
type: 'get',
url: "Controllers/PathWebservice.asmx/GetMenuById",
dataType: "json",
data: { userId: userId },
contentType: "application/json",
type: "POST",
dataType: "json",
contentType: "application/json",
url: "../Controllers/FastreportWebService.asmx/getDimensions",