使用jQuery删除表行的最佳方法是什么? [英] What is the best way to remove a table row with jQuery?
本文介绍了使用jQuery删除表行的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用jQuery删除表行的最佳方法是什么?
What is the best method for removing a table row with jQuery?
推荐答案
你是对的:
$('#myTableRow').remove();
如果你的行有一个 id
,例如:
This works fine if your row has an id
, such as:
<tr id="myTableRow"><td>blah</td></tr>
如果您没有 id
,您可以使用任何jQuery的过多的选择器。
If you don't have an id
, you can use any of jQuery's plethora of selectors.
这篇关于使用jQuery删除表行的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文