这是我正在使用的代码片段。在这里根据我的预期,代码执行不会停止并且表单被提交。虽然警告框出现,但在按下“确定”之后,表单被提交。提醒框不停止执行/提交表格
$('.qto').each(function(index) {
if (jQuery.inArray($("#quota-" + (index + 1)).val(), quoatas) != -1) {
alert("Please check the different values you have entered");
return false;
}
quoatas.push($("#quota-" + (index + 1)).val());
});
你在哪里提交表格? –