JQuery selector for table cells except first/last row/column

后端 未结 2 1220
一个人的身影
一个人的身影 2021-02-02 09:52

is there a way to directly select all \'inner\' table cells ( elements) of a table (i.e. all cells except the ones in the first and last

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-02 09:57

     $('#table_name tr td:not(:first-child)').each(function () {
                        $(this).html('');
                    });
    

    Here example how to Skip 1st td of a table(table_name) .U can write :last-child to skip last td to do some task.

提交回复
热议问题