Remove table row using jQuery

前端 未结 6 1679
别跟我提以往
别跟我提以往 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:40

    You can't remove like that you have to specify which node you want to remove $('#table tr:first') and the remove it remove()

    $('#remove').click(function(){
        $('#table tr:first').remove();
    })
    

    http://jsfiddle.net/2mZnR/1/

提交回复
热议问题