我正在寻找选择表中第二行的第2-4列。jquery的选择器中有没有"and“函数?或者我必须做这样的事情?
$('#id tr:eq(1)').find('td:lt(5)').find('td:gt(1)')发布于 2010-05-25 01:26:39
我还没有尝试过,但理论上它应该是有效的:
$('#id tr:eq(1) td:lt(5):gt(1)')发布于 2010-05-25 01:34:04
.slice()运行良好
$('#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);
});https://stackoverflow.com/questions/2898876
复制相似问题