[Solved] How can I change id in string
Since you are already using jquery: for (var i = 0; i < tab.length; i ++) { tab[i] = $(tab[i]).find(“tr”).first().attr(“id”, “id_” + i); } What this does: Create jquery objects from the html string: $(tab[i]) Find the first tr object: .find(“tr”).first() Set the attribute “id” of the object to “id_” + i: .attr(“id”, “id_” + … Read more