You problem might be that you don't specify dataType for your ajax request, try adding this :
dataType: 'json'
题
I made a work around as below but i don't like it. I would like to understand why it happened.I'm also afraid to have more problems like that.
$.ajax({
type: "POST",
url: "test.cgi",
data: form_data,
beforeSend: function(){
$("#"+type+"_div").html("<span class='LabelRed12'>Loading , please wait..</span><br/>");
},
complete: function(){
},
success: function(html){
$("#"+type +"_div").html(html);
},
error:function(xhr,err){
if (xhr.readyState == 4) {
if (xhr.status == 200) {
$("#"+type +"_div").html(xhr.responseText);
} else
alert("status is " + request.status);
}
}
});
解决方案
You problem might be that you don't specify dataType for your ajax request, try adding this :
dataType: 'json'
其他提示
you should use jquery migrate plugin when you move from lover version to higher version. Check the jquery site and get the migrate jquery api. This will solve your issue
Refer : jquery.com/download/