参考:
jquery 表单 清空
$(':input','#myform')
.not(':button, :submit, :reset, :hidden')
.val('')
.removeattr('checked')
.removeattr('selected');
这个js是可以实现清空表单中填写及传入的值的,但要注意:
1、jq实现,此<input />不能放在form表单内!;
2、直接写在onclick属性中即可
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!