我开始为我的表使用数据表。我现在有一张桌子和顾客在一起。第一行是表头。第二行是添加新客户的按钮。其余行是客户列表。
我希望数据表对所有内容进行排序,而不是对“新客户”行进行排序。如何锁定该行/将其排除在排序之外?
试过这个:
<table class="muitable" border="0" cellpadding="0" cellspacing="3" id="customertable">
<thead>
<tr>
<th>
</th>
<th>
</th>
<th class="muitable bluehover hand" >
Name
</th>
<th class="muitable bluehover hand" >
Created
</th>
<th class="muitable bluehover hand" >
Status
</th>
</tr>
<tr>
<th width="16">
</th>
<th class="muitable hovernextcell" onclick="newcustomer()">
<img src="/common/images/plus.png" width="16" height="16" class="hand">
</th>
<th class="muitable bluecell">
New customer
</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
--contents--
</tbody>
</table>
现在出现的问题是“排序按钮”到处都是。当第二行的单元格中有值时,这成为按钮,如果没有,它使用第一行作为排序按钮。
如何告诉数据表单独留下第二行,只使用第一行作为标题?