在模态的隐藏事件中可以调用表单重置`//模态隐藏调用$("#jgdwModal").on("hide.bs.modal",function(){type=undefined;$("#inputLatitude").val('');//纬度$("#inputLongitude").val('');//经度document.getElementById("baseinfoform").reset();$("#deptselect").select2('val','');$("#inputArea").select2('val','');$("#inputsshy").select2('val','');$("#baseinfoform").data('bootstrapValidator').resetForm();if(nodeid!=undefined){GetJCDwList(nodeid,$("#searchtext").val());}});`
温馨提示:答案为网友推荐,仅供参考