我正在尝试通过$.ajax
.
我正在使用这个 API:
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://example.com/
完整代码:
$.ajax({
type: "GET",
url: "http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://example.com/",
dataType: "jsonp",
success: function(result) {
console.log(result.result.views);
}
});
问题:
它在控制台“ Resource interpreted as Script but transferred with MIME type text/plain
”中返回,而不是视图计数+其他一些不应该存在的东西
图像中的完整错误:http: //i.imgur.com/neIvsMf.png
我可以只使用 JavaScript 来计算这些视图吗?