How can I add a row to an HTML table with JQuery? I have the following code but what it does is add a row in the part of thead of my table and the goal is to add it in the tbody.
function agregarFila(Id, Nombres, ApellidoP, AppellidoM) {
var htmlTags = '<tr><td>' + Id + '</td><td>' +
Nombres + '</td><td>' + ApellidoP + '</td><td>' +
AppellidoM + '</td></tr>';
$('#tablaprueba tr:last').after(htmlTags);
}