//usertable的页面刷新 $("#usertable").bootstrapTable('refresh');
//第一种:当模态框完全关闭时的初始化 $('#myModal').on('hide.bs.modal', function () { $('input').removeAttr("readonly"); }) //第二种:当模态框完全关闭时的初始化 $('#addItemModel').on('hidden.bs.modal', function (e) { //第一种:form表单清空 $("#item_form")[0].reset(); //第二种:清除模态框中的内容 document.getElementById("contact_form").reset(); });
//当模态框完全打开时的初始化 $("#userModel").on("shown.bs.modal", function () { $("#usertable").bootstrapTable('refresh'); }).modal('show');
$(document).ready(function () { //form表单的提交 $("#item_form").on("submit", function(e) { //获取form表单的数据 var postData = $(this).serializeArray(); dopost(postData,"/orderItem/addOrderItem",addCallBack); return false; }); //给保存按钮添加提交事件 $("#item_submitBtn").on('click', function() { $("#item_form").submit(); }); });
文章来源: https://blog.csdn.net/qq_42806727/article/details/90067739