jQueryに問題があります。いくつかのコードをコピーする必要があります。追加するのは別の場所です。
私がコピーを取りたいソースは次のとおりです。
<div id="copyCode" style="display: none">
<div class="ofPagedataTable">
<tr class="page copy">
<td class="id"><input type="text" /></td>
<td class="sprache"><input type="text" /></td>
<td class="description"><input type="text" /></td>
<td class="title"><input type="text" /></td>
<td class="keywords"><input type="text" /></td>
</tr>
</div>
</div>
私が使用しているjQueryは次のようなものです。
$('.addPageToPagedata').click(function(){
html = $("#copyCode").children(".ofPagedataTable").html();
target = $('.pagedata tbody').children(':last');
$(html).appendTo(target);
});
これは一種の機能ですが、jQueryは<tr>
and <td>
Elementsを削除し、次のように追加しています。
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
どうしたらいいのかわからない。誰かがこれを解決する方法を私に提案してくれるといいですね。
ありがとうございました!