【发布时间】:2020-11-24 21:36:22
【问题描述】:
为什么会出现这个错误?
Here is a screenshot of my Network tab in Firefox showing the NS_BINDING_ABORTED
我在这里查看了NS_BINDING_ABORTED Shown in Firefox with HttpFox 的这个帖子,但我根本不知道它在说什么......
有人可以帮我吗?
谢谢
$(function() {
let userName = null;
let userStatus = null;
$("#search").on("click", function() {
userName = $("#username").val();
apiCall();
});
$(".dropdown-menu a").on("click", function() {
$("button.dropdown-toggle").text($(this).text());
userStatus = $("button.dropdown-toggle").text();
});
function apiCall() {
if (userName !== null && userStatus !== null) {
var api = `https://api.jikan.moe/v3/user/${userName}/animelist/${userStatus}`;
fetch(api, {
method: "GET",
headers: {
Accept: "application/json",
},
})
.then(response => response.json())
.then((data) => {
console.log(data)
})
.catch((error) => {
console.log(error);
})
}
}
});
【问题讨论】:
标签: javascript html jquery css