网上找的方法基本都是
$('body').on('hidden.bs.modal', '.modal', function () { $(this).removeData('bs.modal'); }); 经测试此方法不起作用,改为如下方法即可:
$('#myModal').on('hidden.bs.modal', function (){
$(':input','#myModal').not(':button,:submit,:reset').val('').removeAttr('checked').removeAttr('checked');
}dsa);