复制和删除选中行

          //复制选中的行
$("#add_list").click(function(){ $(".col-right input:checked ").each(function(){ var tr = document.createElement("tr"); var html=$(this).parent().parent().html(); tr.innerHTML=html; var this_class=$(this).attr("class"); if($("."+this_class).length<2){ $(".col-left table").append(tr); //防止相同行多次添加 } }); });
      //删除选中的行 $(
"#remove_list").click(function(){ $('.col-left input:checked').each(function(){ $(this).parent().parent().remove(); }) });

原文地址:https://www.cnblogs.com/xsffliu/p/8617632.html