在下一页中,使用Firefox,删除按钮提交表单,但添加按钮不提交.如何阻止删除按钮提交表单?
<html>
<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
function addItem() {
var v = $('form :hidden:last').attr('name');
var n = /(.*)input/.exec(v);
var newPrefix;
if ( n[1].length == 0 ) {
newPrefix = '1';
} else {
newPrefix = parseInt(n[1])+1;
}
var oldElem = $('form tr:last');
var newElem = oldElem.clone(true);
var lastHidden = $('form :hidden:last');
lastHidden.val(newPrefix);
var pat = '=\"'+n[1]+'input';
newElem.html(newElem.html().replace(new RegExp(pat, 'g'), '=\"'+newPrefix+'input'));
newElem.appendTo('table');
$('form :hidden:last').val('');
}
function removeItem() {
var rows = $('form tr');
if ( rows.length > 2 ) …Run Code Online (Sandbox Code Playgroud) 为什么我收到这个错误?
这是我在 Firefox 中的网络选项卡的屏幕截图,显示了 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); …Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的 WordPress 网站中PUT使用发送请求。fetch API在 Google Chrome 中使用时,请求正常运行,没有任何问题。但在 Firefox 中,请求被阻止,如下图所示,NS_BINDING_ABORTED控制台中显示。控制台的响应选项卡中也没有数据。(我使用的是最新版本Firefox 92.0(64位))。本地主机和托管站点都会出现问题。
在对这个问题进行了大量搜索之后,我尝试过:
Enhanced Tracking Protection, 关闭HTTPS-Only ModeFetch请求更改为AJAX请求。manifest.json文件storage",*://localhost/*polyfillsCache-Control: no-cache, must-revalidate, max-age=0和标头。Expires:仍然没有解决这个问题。总之,请求被火狐浏览器阻止,我无法找出原因。任何帮助表示赞赏!