单击某一行中的复制链接时,我需要创建另一行并将其所有内容复制到新行。这是我有的代码:无法复制单元值
addNewInlineRow(sid, idToUse); // this creates a new row with empty values
//this copies the value from old row to new row
$("#"+rowId+ " td").each(function(index){
$("#"+idToUse+ " td").get(index).text($(this).text());
});
但是这段代码不起作用。有什么建议么?由于存在用于创建TR ID的复杂逻辑,我无法克隆整个TR!
你试过克隆TR? –