为什么IE9下面$.ajax返回的data是undefined?
问题如标题
结果是因为编码问题。在IE9下面直接返回undefined
$.ajax({ url:"/cservice/processlist/?t=" + Math.random(), type:"GET", cache:false, contentType:'application/json; charset=utf-8;', //统一前后端编码为utf-8防止ie下返回undefined data:{pager:"1", count:"30",status:"99"}, success:function(data,status){ $("#contentall").html(data.htmlstr); $("#pagerall").pager({ pagenumber: 1, pagecount: data.total, buttonClickCallback: PageClick }); }, error:function(){alert("error")} , dataType: "json", });