使用bootstrapTable插件遇见的错误 记录一下
报的错误:
我的代码:
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.15.3/dist/bootstrap-table.min.css">
//html js
<table id="tableTemp"></table>
<script>
$("#tableTemp").bootstrapTable({
columns:[{
field:"id",
title:"ITEM ID"
},
{
field:"name",
title:"Item name"
},
{
field:"price",
title:"Item price"
}
],
data:[
{
id:12,
name:"zs",
price:"200.00"
},
{
id:12,
name:"zs",
price:"200.00"
},{
id:12,
name:"zs",
price:"200.00"
}
]
})
</script>
原因就是低版本的jquery和bootstrapTable有些冲突 下载个版本高一点的jquery就能用了 自测jquery.3.6.min.js可用