表格表头随滚动条滚动

1.所需文件

fixed_table_rc.css

sortable_table.js

fixed_table_rc.js

2.表格样式

<table id="fixed" class="detailTable tableValuation taskTable" >
<thead>
<tr class="top_valuation trBg" style="border:none;">
<th style="border-left:none;"><div>序号</div></th>
<th><div  class="centerList" >物料类别</div></th>
<th><div  class="centerList" >实物名称</div></th>
<th><div  class="centerList" >型号</div></th>
<th><div  class="centerList" >单位</div></th>
<th><div  class="centerList" >入库数量</div></th>
<th><div  class="centerList" >领用入库数量</div></th>
<th><div  class="centerList" >借用入库数量</div></th>
<th><div  class="centerList">采购入库数量</div></th>
<th><div  class="centerList" >租用入库数量</div></th>
<th><div  class="centerList" >调拨入库数量</div></th>
<th><div  class="centerList">出库数量</div></th>
<th><div  class="centerList" >一般出库数量</div></th>
<th><div  class="centerList" >领用退还出库数量</div></th>
<th><div  class="centerList" >借用退还出库数量</div></th>
<th><div  class="centerList" >租用退还出库数量</div></th>
<th><div  class="centerList" >调拨出库数量</div></th> 
<th><div  class="centerList" >退库数量</div></th> 
<th><div  class="centerList" >库存数量</div></th> 
<th><div >盘点数量</div></th> 
<th><div >盘点结果</div></th> 
<th><div >备注</div></th>
</tr>
</thead>
<tbody  id="detailTable"> 
 </tbody>

</table>

3.前端js

$('#fixed').fxdHdrCol({
//fixedCols: 2,
width: "100%",
height:bodyHeight-titleTop-tableStyle-titleHeight-divCenter-15,
colModal: [
{ width: 100, align: 'center' },
{ width: 300, align: 'center' },
{ width: 300, align: 'center' },
{ width: 250, align: 'center' },
{ width: 100, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 120, align: 'center' },
{ width: 200, align: 'center' },
{ width: 250, align: 'center' },
]

}); 


4.效果



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值