更新时间:2023-12-03 13:53:58
解决方案是在关闭引导模态窗口后将其完全破坏,而在再次打开该窗口时不还原所有内容.
The solution is to destroy the bootstrap modal window completely after closing it , to not restore everything when open it again .
$('#modal').on('hidden', function(){
$(this).data('modal', null);
});
如果是引导程序3,则可以使用:
if is bootstrap 3 you can use:
$("#modal").on('hidden.bs.modal', function () {
$(this).data('bs.modal', null);
});