“未捕获的SyntaxError:意外的令牌:”JSONP响应
这个问题在这里已经有了答案:
尝试:
function testJSONP(url) {
$.ajax({
url: url,
jsonp: "callback",
contentType: 'application/javascript',
dataType: "jsonp",
success: function (response) {
console.log(response);
}
});
}
这样写...
function testJSONP(url) {
$.getJSON(url,{},function(response){
console.log(response);
});
}
链接地址: http://www.djcxy.com/p/46025.html
上一篇: "Uncaught SyntaxError: Unexpected token :" JSONP response