私は<tr>
Javascript変数を介してを追加しています:
var txtBox = "<tr id='dynTR'><td><input type='text' class='textBoxes' /></td><td><input type='text' class='textBoxes' value='0' /></td><td><input type='button' value='-' /></td></tr>";
私の機能は次のとおりです。
function AddTR(table) {
$(table).append(txtBox);
}
HTMLのテーブル構造(関数のボタンと一緒に)は次のとおりです。
<table id="tblTest" class="testTable">
<thead>
<tr>
<td>Product</td>
<td>Quantity</td>
<td>Remove TR</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
<br />
<input type="Button" id="btnTest" value="Add Table Row" onclick="AddTR($('#tblTest'))" />
.remove()
では、jQueryの関数を使用して、誤ってすべてのタグを削除せずに親タグを削除するにはどうすればよい<tr id='dynTR'>
ですか?