Persiapan untuk fitur Create, Update, dan Delete
This commit is contained in:
parent
f2975a0089
commit
65f4657d4d
@ -4,12 +4,17 @@
|
|||||||
<link rel="stylesheet" href="//cdn.datatables.net/2.3.2/css/dataTables.dataTables.min.css">
|
<link rel="stylesheet" href="//cdn.datatables.net/2.3.2/css/dataTables.dataTables.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<input type="text" placeholder="Name" />
|
||||||
|
<input type="text" placeholder="Phone" />
|
||||||
|
<button>Create</button>
|
||||||
|
<hr>
|
||||||
<table id="table-list">
|
<table id="table-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Phone</th>
|
<th>Phone</th>
|
||||||
|
<th>Act</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
@ -32,5 +32,11 @@ var table = $('#table-list').DataTable({
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"data": null,
|
||||||
|
"render": function(data, type, row) {
|
||||||
|
return `<button>Update</button> <button>Delete</button>`;
|
||||||
|
}
|
||||||
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user