这是我的代码
$.ajax({
type:"GET",
url: "http://fantasy.premierleague.com/web/api/elements/100/",
success: function(data) {
alert(JSON.stringify(data));
},
error: function(jqXHR, textStatus, errorThrown) {
alert(jqXHR.status);
},
dataType: "json"
});
但是当我运行它时出现错误jqXHR.status is 0
。 textStatus 是Error
并且 errorThrown 是No Transport