} // 隔行换颜色,依赖odd样式 this.isOdd = true; var rows = table.tBodies[0].rows;
// We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones for (var i=0;i<rows.length-1;i++) ...{ this.doStripe(rows[i+1]); } }, /**//** * 隔行分色策略,依赖odd样式 **/ doStripe : function(rowItem) ...{ if (!this.isOdd) ...{ css.addClassToElement(rowItem, 'odd'); } else ...{ css.removeClassFromElement(rowItem, 'odd'); }
this.isOdd = !this.isOdd; }, /**//** * 删除目标列 **/ delRow : function(e) ...{ var that = crudbtn.that;