Remove table row using jQuery

前端 未结 6 1667
别跟我提以往
别跟我提以往 2021-02-19 03:57

The following is my code

Script

$(document).ready(function(){
    $(\'#click\').click(function(){
        $(\'#table\').append(\'&a         


        
6条回答
  •  北海茫月
    2021-02-19 04:31

    If you want to remove the last table row of #table, you need to target it with your selector, and then call $.remove() against it:

    $('#remove').on("click", function(){
        $('#table tr:last').remove();
    })
    

提交回复
热议问题