【发布时间】:2016-10-24 23:24:07
【问题描述】:
我可以迭代所有行和列,但是当表格合并单元格时它不起作用。 它不会遍历所有普通列的合并行(没有任何合并单元格)。
我的脚本:
$('#test tr').each(function() {
$(this).find('td').each(function(colIndex)
{
if(colIndex > 1)
{
$(this).css('background-color', 'red');
}
});
});
【问题讨论】:
标签: jquery html-table