1.8.2
$.ajax({
url: "/someurl/",
async: true,
dataType: 'json'
}).done(function ( data ) {
if( console && console.log ) {
console.log("Sample of data: ", data);
}
});
导致错误“Uncaught TypeError: Cannot call method 'done' of undefined”,但请求发送和服务器响应带有数据!如果我写
$.ajax({
url: "/someurl/",
async: true,
dataType: 'json',
success: function (data) { console.log(data); }
});
没关系,console.log 会触发!