版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_29290295/article/details/82885782
//关闭模态框时清空数据
$(function (){
$('#myModalId').on('hidden.bs.modal', function (){
$(':input','#myFormId').not(':button,:submit,:reset').val('').removeAttr('checked').removeAttr('checked');
});
});