Updated code example with from (#table1) and to (#table2) tables defined.
var i = 1;
$("button").click(function() {
$("table#table1 tr:first").clone().find("input").each(function() {
$(this).val('').attr('id', function(_, id) { return id + i });
}).end().appendTo("table#table2");
i++;
});