jQuery delete all table rows except first

后端 未结 14 1192
失恋的感觉
失恋的感觉 2021-01-29 17:40

Using jQuery, how do I delete all rows in a table except the first? This is my first attempt at using index selectors. If I understand the examples correctly, the following sh

14条回答
  •  鱼传尺愫
    2021-01-29 18:06

    -Sorry this is very late reply.

    The easiest way i have found to delete any row (and all other rows through iteration) is this

    $('#rowid','#tableid').remove();

    The rest is easy.

提交回复
热议问题