$.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');
}
});
$.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');
}
});
- 您漏了一个逗号。
- 查看评论