How I can delete rows in HTML table by using a parameter. In this example, I want to delete all the row that contains "Rock" in Data 1. "Rock" will be the parameter. I'm using mvc4.
<input type="text" id="tpcName" class="inputBox">
<table id="myTable">
<thead>
<tr>
<th style="width: 50px;"></th>
<th style="width: 50px;">Data 1</th>
<th style="width: 50px;">Data 2</th>
<th style="width: 50px;">Data 3</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>Rock</td>
<td>Soil</td>
<td>Sand</td>
</tr>
<tr>
<td></td>
<td>Rain</td>
<td>Water</td>
<td>Sea</td>
</tr>
<tr>
<td></td>
<td>Rock</td>
<td>Soil</td>
<td>Sand</td>
</tr>
<tr>
<td></td>
<td>Rock</td>
<td>Soil</td>
<td>Sand</td>
</tr>
</tbody>
</table>
<button type="button" onclick="myFunction(tpcName.value)"> Delete</button>