<分区>
我知道这个问题已经被问过很多次了,因为我已经使用了这个网站的解决方案但没有用。我目前有这个实现:
$("input:reset").click(function () {
$('#answer_2').html('License number is not long enough');
$('#answer_1').html('');
$('#data_entry').each (function(){
this.reset();
});
});
我知道选择器是正确的,因为两个 html 更改(我将它们放入以确认我是正确单击重置按钮的选择器)发生了它们应该发生的情况。
这是我的表单声明:
<form name="data_entry" id="data_entry" method="post" action="">
问题是我不断收到没有“重置”功能且表格从未被清除的错误。这是我最近尝试在 stackoverflow 站点上跟踪此问题的答案。请帮忙。