2010-05-24 6 views

Répondre

3

Je n'ai pas essayé, mais théoriquement, il devrait fonctionner:

$('#id tr:eq(1) td:lt(5):gt(1)') 
3

.slice() fonctionne bien

$('#tableId tr').eq(1).find('td').slice(1,4); //2nd row, 2nd-4th td 

$('#tableId tr').slice(1,5); // get specific rows 

$('#tableId td').slice(1,4) // get specific columns 

$('#tableId tr').each(function() { 
    // do code per row 
    var $columnRange = $(this).find('td').splice(1,4); 
}); 
Questions connexes