$('input').not(":first").each(function () {
$("#" + this.id)
.not(':button,:submit,:reset,:hidden') //将myform表单中input元素type为button、submit、reset、hidden排除
.val('') //将input元素的value设为空值
.removeAttr('checked')
.removeAttr('checked') // 如果任何radio/checkbox/select inputs有checked or selected 属性,将其移除
});
清空所有input
最新推荐文章于 2022-07-20 11:12:13 发布