码迷,mamicode.com
首页 > 其他好文 > 详细

bootstrap清除modal内容,防止数据缓存。

时间:2019-05-22 16:01:41      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:hid   oda   moved   orm   fun   tst   bootstrap   dal   数据   

网上的方法:

$("#create_modal").on("hidden.bs.modal", function() {
    $(this).removeData("bs.modal");
});
实测:
$(‘#Modal‘).on(‘hidden.bs.modal‘, function () {
$(‘#Id‘).html(‘‘);
});
这种方法只适合一个输入框的情况。如果是form表单可以采用jq的重置表单方法。

bootstrap清除modal内容,防止数据缓存。

标签:hid   oda   moved   orm   fun   tst   bootstrap   dal   数据   

原文地址:https://www.cnblogs.com/qinghuaL/p/10905950.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!