今天利用了sorttable.js对表格进行排序,这个js的使用方法非常简单,让我大吃一惊,首先在布局文件的开始导入该js,然后只需要在table标签添加一个class="sortable"就一切OK了,这样就实现了表格的正反序的排列,不过这样只能使用该js的css了,网上提供了css的修改方案,我还没有试。
table.sortable thead {
background-color:#eee;
color:#666666;
font-weight: bold;
cursor: default;
}
table.sortable thead {
background-color:#eee;
color:#666666;
font-weight: bold;
cursor: default;
}