function clear(dom) {
$(dom).find("input[type=text]").each(function() {
$(this).val("");
});
$(dom).find("input[type=hidden]").each(function() {
$(this).val(this.defaultValue);
});
$(dom).find("input[type=file]").each(function() {
$(this).val("");
});
$(dom).find("input[type=password]").each(function() {
$(this).val("");
});
$(dom).find("input[type=checkbox]").each(function() {
this.checked = false;
});
$(dom).find("input[type=radio]").each(function() {
this.checked = false;
});
$(dom).find("option").each(function() {
this.selected = false;
});
$(dom).find("textarea").each(function() {
$(this).val("");
});
}
js 清空页面录入信息
最新推荐文章于 2022-11-12 00:39:21 发布