Persiapan untuk fitur Create, Update, dan Delete

This commit is contained in:
Dita Aji Pratama 2025-06-10 11:24:02 +07:00
parent f2975a0089
commit 65f4657d4d
2 changed files with 11 additions and 0 deletions

View File

@ -4,12 +4,17 @@
<link rel="stylesheet" href="//cdn.datatables.net/2.3.2/css/dataTables.dataTables.min.css">
</head>
<body>
<input type="text" placeholder="Name" />
<input type="text" placeholder="Phone" />
<button>Create</button>
<hr>
<table id="table-list">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Phone</th>
<th>Act</th>
</tr>
</thead>

View File

@ -32,5 +32,11 @@ var table = $('#table-list').DataTable({
return data;
}
},
{
"data": null,
"render": function(data, type, row) {
return `<button>Update</button> <button>Delete</button>`;
}
},
],
})