bootstrap-table搜索框以及下方页码乱码问题解决

图1

图2

问题如上图1,2,原因是这两个包的导入顺序

<script src="../js/bootstrap-table/bootstrap-table.js"></script>
<script src="../js/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>

交换:

<script src="../js/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
<script src="../js/bootstrap-table/bootstrap-table.js"></script>

虽然不乱码了....但是变成英文了(图3,4),因为bootstrap-table-zh-CN中文没用上

图3

图4

 将bootstrap-table-zh-CN.js单独拷贝出来,重新utf-8生成一下,放在bootstrap-table.js一起,如图5,6

<script src="../js/bootstrap-table/bootstrap-table.js"></script>
<script src="../js/bootstrap-table/bootstrap-table-zh-CN.js"></script>

 

图5

图6

原文地址:https://www.cnblogs.com/winv758241/p/9188842.html