If I console.log(result); 开发者_Python百科I get
{"MSG":"WRONG","QUESTIONID":182.0}
But If I console.log(result.QUESTIONID); I get
undefined
What am I doing wrong?
I needed to do this:
$.ajaxSetup({
type: "POST"
,dataType: 'json'
,error: function(XMLHttpRequest, textStatus, errorThrown) {
$('#msg').text(textStatus).addClass('err');
}
});
精彩评论