我有一个 tr 元素表,我在其中单击每一行的删除,它会从表中删除自己。我的html如下
<tr class="tr_body">
<td>
<input type="text" class="fabric_input createWOBlockBG small ui-autocomplete-input" name="basefabrics[]" onfocus ="loadUniqueAjax(' . "'fabric_input'" . ')" autocomplete="off">
</td>
<td>
<input type="text" class="fac_input createWOBlockBG small ui-autocomplete-input" name="facSnapshots[]" id="facSnapshot" autocomplete="off">
</td>
<td>
<a class ="deleteRow">delete</a>
</td>
</tr>
我的jQuery如下
$('.deleteRow').click(function(){
var elementDelete = $(this).parent().parent();
$('#tablelist').remove(elementDelete);
});
但是,当我单击 deleteRow 锚标记时,它返回 Uncaught TypeError: Object [object Object] has no method 'replace'。在此先感谢您的帮助。