1.在利用jQuery做ajax时,status==200但是却返回至error方法中,原因在于jQuery对返回的数据类型进行了检查,用制定的dataType进行检查,如果不正确,则跳转至error方法中(最初指定的dataType='json',但是返回的数据格式却不是的)。
$.ajax({
url : Geoway.root+'catalog/getTreeTypeCTAction.action?date='+new Date(),async : true,
dataType : 'text',
data : {url : url},
success : function(res){
debugger;
alert(res);
},
error:function(e){
debugger;
alert(e);}
});