<table id="selectCaseTable" class="table table-bordered table-striped table-hover">
<!-- table code... -->
</table>
<!-- jQuery 3 -->
<script src="/static/adminlet-2.4.10/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="/static/adminlet-2.4.10/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="/static/adminlet-2.4.10/dist/js/adminlte.min.js"></script>
<script src="/static/adminlet-2.4.10/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="/static/adminlet-2.4.10/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/adminlet-2.4.10/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- FastClick -->
<script src="/static/adminlet-2.4.10/bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="/static/adminlet-2.4.10/dist/js/demo.js"></script>
<srcipt>
fuctions addSelectCase(){
...
$("#selectCaseTable").bootstrapTable('refresh');
}
</script>
当我像下面这样呼叫
bootstrapTable("refresh")
时$("#selectCaseTable").bootstrapTable('refresh');
我在控制台上看到错误
TypeError:$(...)。bootstrapTable不是函数
最佳答案
您应该调用Datatable()
而不是bootstrapTable()
,如下面的代码所示:
var table = $('#example').DataTable();
table.ajax.reload();
要了解更多信息,请单击此处查看先前的question。
关于jquery - TypeError:$(…).bootstrapTable不是函数,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/56160322/