How do you append rows to a table using jQuery?

前端 未结 7 1429
渐次进展
渐次进展 2020-12-01 01:34

Hi I was trying to add a row to a table using jQuery, but it is not working.
What might be the reason?

And, can I put in some value to the newly added row..?

7条回答
  •  感情败类
    2020-12-01 01:41

    Add as first row or last row in a table

    To add as first row in table

    $(".table tbody").append("New row");
    

    To add as last row in table

    $(".table tbody").prepend("New row");
    

提交回复
热议问题