$(‘#mytable‘).bootstrapTable() is not a function解决方案(亲测)

出现这个错误一般都是html页面中,js引入的顺序和js引入的位置引起的,放好位置,就绝对可以了。

首先,检验下,引入的路径对不对,这个低级错误也有可能会有人犯!

然后,引入位置:

css放在<head>标签内

<link href="css/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />

js放在<body>抱歉内,紧贴着body标签后面即可,注意js顺序,先jquery、bootstrap、bootstrap-table、汉化文件……

<script src="js/jquery-3.2.1.min.js"></script>
    <!-- <script src="js/jquery.min.js"></script> -->
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/bootstrap-table/bootstrap-table.js"></script>
    <script type="text/javascript" src="js/bootstrap-table/bootstrap-table-zh-CN.js"> //汉化文件
 </script>


版权声明:本文为happy81997原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。