jQuery Clone table row

前端 未结 7 1145
悲&欢浪女
悲&欢浪女 2020-11-30 03:56

I have a table with an Add button on the end. When you click this button I want a new table row to be created underneath the current one. I also want the input fields on thi

7条回答
  •  离开以前
    2020-11-30 04:07

    Try this variation:

    $(".tr_clone_add").live('click', CloneRow);
    
    function CloneRow()
    {
        $(this).closest('.tr_clone').clone().insertAfter(".tr_clone:last");
    }
    

提交回复
热议问题