本文介绍了TypeError:$(...).bootstrapTable不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<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');
我在控制台上看到错误
推荐答案
您应该在呼叫Datatable()
而不是bootstrapTable()
,如下所示:
You are supposed to be calling Datatable()
not bootstrapTable()
as shows the code below:
var table = $('#example').DataTable();
table.ajax.reload();
有关更多知识,请单击此处查看先前的问题.
For further knowledge click here to see previous question .
这篇关于TypeError:$(...).bootstrapTable不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!