in html
<tbody id="table-body">
<?php include 'tableBody.php';?>
</tbody>
in your button function
$.get("tableBody.php", function(data) {
$("#table-body").html(data);
});
When the button function is trigger, it will fire up the AJAX GET request to the tableBody.php
, and then use its content to update the <tbody>
with id table-body
.
2
solved How to update an HTML table content without refreshing the page? [closed]