首页 相关文章 jquery 可排列的表实现代码

jquery 可排列的表实现代码

在Table标签上设置 class="sortable" 且Table要设置ID.
表中增加了两行代码是JQuery写的.用于给奇偶行变色.
代码如下:
addEvent(window, "load", sortables_init);

var SORT_COLUMN_INDEX;

function sortables_init() {
// Find all tables with class sortable and make them sortable
if (!document.getElementsByTagName) return;
tbls = document.getElementsByTagName("table");
for (ti=0;titbls.length;ti++) {
thisTbl = tbls[ti];
if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) {
//initTable(thisTbl.id);
ts_m...[ 查看全文 ]

2016-02-19 标签:

jquery 可排列的表实现代码的相关文章

手机页面
收藏网站 回到头部