Thursday, 8 August 2013

Remove all rows of a table if the check box is checked?

Remove all rows of a table if the check box is checked?

I have below table in my jsp.
<table class="myTable" id="myTable" border="0" cellspacing="0"
style="border-spacing: 0; width: 100%; border-collapse: collapse;">
<tr class="impClass">
<td class="myClass">
<div>
<label for="delete">Delete</label>
<br>
<input class="mySecondClass" type="checkbox" id="delete"
name="delete">
</div>
</td>
</tr>
<tr class="impClass">
<td class="myClass">
<div>
<label for="delete">Delete</label>
<br>
<input class="mySecondClass" type="checkbox" id="delete"
name="delete">
</div>
</td>
</tr>
<tr class="impClass">
<td class="myClass">
<div>
<label for="delete">Delete</label>
<br>
<input class="mySecondClass" type="checkbox" id="delete"
name="delete">
</div>
</td>
</tr>
</table>
I want to delete all rows of a table if their delete check box is checked.
How can i remove all the rows from the table whose delete check box is
checked using jquery?
Please help me.
Thanks!

No comments:

Post a Comment