var divHeight = $("#tableDiv").height()*0.68;
$(function () {
self.setInterval(obj.funInit(), 1000 * 60 * 30);
});
var obj = {
funInit: function () {
$('#scheduling').bootstrapTable({
method: 'get',
url: '/Working/GetTotalAMB',
pagination: true,
sidePagination: "server",
toolbar: '#toolbarDetail',
paginationDetailHAlign: ' hidden',
striped: true,
pageSize: 20,
height: divHeight,
queryParams: function (params) {
return params;
},
});
},
}
tablediv的高度是百分比,每次拿整個div的高度來給table賦值,但是當解析度改變時,table右邊會出現滾動條,我不想要這種效果,我想要整個table集體變化,而不是只出現一個滾動條,請問應該怎么調整
uj5u.com熱心網友回復:
<div class=" clearfix" style="width:47%;float:left;height:100%;" id="tableDiv">
<h4>最近三天AMB總產值</h4>
<table id="scheduling" >
<thead>
<tr>
<th data-field='CreateTime'>出勤日期</th>
<th data-field='AttendanceHours'>出勤時數</th>
<th data-field="TotalRevenue">總收入</th>
<th data-field='TotalExpenditure'>總支出</th>
<th data-field='ProfitPer'>總獲利</th>
<th data-field='ProfitPerHour'>每小時獲利</th>
</tr>
</thead>
</table>
</div>
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/19493.html
標籤:ASP.NET
