bootstrap-table多了很多层div是什么情况?
html代码:
<head>
<meta chatset-"UTF-8" />
<meta name="viewoprt" content="width=device-width,initial-scale=1.0" />
<title>xxx</title>
<link rel="stylesheet" href="cockpit/js/bootstrap-3.4.1-dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="cockpit/js/bootstrap-table-master/bootstrap-table.css" />
<link rel="stylesheet" href="cockpit/js/bootstrap-select-1.13.14/css/bootstrap-select.min.css" />
<link rel="stylesheet" href="cockpit/js/bootstrap-datepicker-master/css/bootstrap-datepicker.min.css" />
<link rel="stylesheet" href="cockpit/js/bootstrap-datepicker-master/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet" href="cockpit/css/remixicon.css" />
<link rel="stylesheet" href="cockpit/css/QWcss.css" />
</head>
<body>
<section class="mainbox">
// 主要是这一行
<div class="row">
<table class="table table-hover table-bordered" id="modeltable"></table>
</div>
</hr>
</section>
</body>
</html>
js代码:
function XXXXX(obj) {
$.ajax({
type: "POST",
url: "/url/url/url",
data: 传的参数,
async: false,
success: function (data) {
$('#modeltable').bootstrapTable({
data: data, //datalist 即为需要的数据
dataType: 'json',
data_locale: "zh-US", //转换中文 但是没有什么用处
striped: false, //是否显示行间隔色
cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
pagination: false, //是否显示分页(*)
contentType: "application/x-www-form-urlencoded", //重要选项,必填
headerStyle: headerStyleFnf,
columns: [
。。。。。。 ]
})
}
实际页面: