I have a table that looks like:
onetwothreelast< 2条回答 梦毁少年i (楼主) 2020-12-30 20:28 $('tr').find('td:not(:last)').css('background-color', 'red'); Translates to: for each element in $('tr') selector, do a find() for all tds that are not last. New result is about tds now, so you can apply .css() as wanted. 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
$('tr').find('td:not(:last)').css('background-color', 'red');
Translates to: for each element in $('tr') selector, do a find() for all tds that are not last. New result is about tds now, so you can apply .css() as wanted.
$('tr')
find()
td
.css()