How do I change the content of the cell containing the \'c\' letter in the HTML sample using jQuery?
6条回答 余生分开走 (楼主) 2020-12-29 04:09 Using eq() you can target the third cell in the table: $('#table_header td').eq(2).html('new content'); If you wanted to target every third cell in each row, use the nth-child-selector: $('#table_header td:nth-child(3)').html('new content'); 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
Using eq() you can target the third cell in the table:
$('#table_header td').eq(2).html('new content');
If you wanted to target every third cell in each row, use the nth-child-selector:
$('#table_header td:nth-child(3)').html('new content');