清空模態窗口方法

每次彈出輸入內容後隱藏再次彈出時內容爲空bootstrap

代碼:this

  

$('#operateModal').on('hidden.bs.modal', function () {
$(this).find("input,textarea,select").val('').end()
.find("input[type=checkbox], input[type=radio]").prop("checked", "").end();
$('#operate-form').bootstrapValidator('resetForm', true);
});orm

效果:blog

相關文章
相關標籤/搜索