2
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Id.</th>
<th>Descrição</th>
<th>Qtd.</th>
<th>Unitário</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<th> 1 </th>
<td> 10</td>
<td> 20</td>
<td> 10 </td>
<td> 30 </td>
<td> 300 </td>
</tr>
<tr>
<th> 2 </th>
<td> 40</td>
<td> 50</td>
<td> 10 </td>
<td> 60 </td>
<td> 600 </td>
</tr>
</tbody>
</table>
<button
type="button"
class="btn"
id="btnexcluirultima">ExcluirUltimaLinha</button>
<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
<script type="text/javascript">
$("#btnexcluirultima").on('click', function(){
//Excluir a ultima linha da tabela
$(".table td").closest('td').remove();
});
I just need to delete the last row from the table! As I do, kindly, as I did, it excludes all the rows of the table..., from now on, thank you!
Thank you so much for your help! I already added the code here and solved my problems! Thank you dvd, i am waiting the remaining 10 minutes to mark your response.
– Emilio Dami Silva