Skip to content
Advertisement

how to add edit/delete buttons in each row of datatable

I create a datatable, now I need to edit and delete the records in the table so I want to add delete and edit button next to year column. that column name should be as action.

Action column should be next to the year column and that should contain delete edit buttons. enter image description here

index.html

JavaScript

fetchdata.php

JavaScript

Advertisement

Answer

well for update and delete button , you need an ID, i assumed the id on database will named as id

JavaScript

reference this

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement