I m doing a dynamic table to collect passengers personal data. This table have above a control to add more rows at the end, every row is a copy of the first one, and that one have as last element a link that I use as a control for deleting that row.
问题在于,只有第一行——不是动态创造的——才是实际工作的唯一一条,能够消除自己。
因此,由于缺乏最初的行文(但又是一个问题xD),该页甚至停止建立新的行文。
这是我用来删除行文的法典:
$( .remove ).on("click",function(event){
event.preventDefault;
$(this).parent().parent().remove();
//alert(str);
newRowNum -= 1;
});
and here is the live site if you want need to chek it out: http://www.micontrol.cl/~mvargas/wordpress/wp-transatacama/reservas-rapidas/tabladinamica.php