我正在使用jQuery.ajax函数对asp.net中的页面方法进行ajax调用.我专门将content-type设置为application / json; charset = utf-8.当我在萤火虫中查看响应时,它说内容类型是html.
$.ajax({
async: asyncVal,type: "POST",url: url + '/' + webMethod,data: dataPackage,contentType: "application/json; charset=UTF-8",dataType: "json",error: errorFunction,success: successFunction
});
最佳答案