我正在使用下面的代码重置我在特定表单上的所有值。使用jQuery清除表单
$('#' + frm).closest('form').find("input[type=text], textarea").val("");
$('#' + frm).closest('form').find("input[type=password]").val("");
$('#' + frm).find('input[type=checkbox]:checked').removeAttr('checked');
$('#' + frm + ' input[type="radio"]').prop('checked', false);
它工作正常进行的情况下95%,但我想重置所有选择框回0的选择指标。如果有更好的或者更有效地做到这整个过程复位所有的元素类型,我打开最好的建议。我需要重新设置表格,因为相同的表格将被同一个人一遍又一遍地使用,以增加工作经历。
感谢输入
'document.querySelector( “形式”)。复位()'? – epascarello