$.ajax({
url: url,
dataType: 'jsonp',
success: function(data) { //not firing at all
console.log('success');
console.log(data);
}
error: function() { //always firing even with status 200 & valid JSON response.
console.log('error');
}
});
答案 0 :(得分:1)
$.ajax({
url: url,
dataType: 'jsonp',
success: function(data) { //not firing at all
console.log('success');
console.log(data);
}, //You have missed a comma here..
error: function() { //always firing even with status 200 & valid JSON response.
console.log('error');
}
});