0
是否有可能有一個動畫加載文本/旋轉時加載數據到我的數據表也爲我的刪除列是否可以顯示確認彈出?Datatable ajax刪除確認彈出&加載消息
$(document).ready(function() {
$('#ProvTable').DataTable({
"ajax": {
"url": "/Users/Prov",
"type": "Get",
"data": { "idUser": "@userid", "idCity": "@cityId" },
"datatype": "json"
},
"columns": [
{ "data": "Id", "visible": false, "searchable": false },
{ "data": "Name", "autowidth": true },
{ "data": "City", "autowidth": true },
{ "data": "UID", "autowidth": true },
{
"title": "Delete",
"data": "Id",
"searchable": false,
"sortable": false,
"render": function (data, type, full, meta) {
return '<a href="@Url.Action("Delete", "Users")?id=' + data + '" class="editUser"><span class="glyphicon glyphicon-trash btn-sm btn-danger"></span></a>';
}
},
]
});
是的,你可以顯示刪除操作的確認彈出 –
是的,這顯然是可能。閱讀[這個SO帖子](http://stackoverflow.com/questions/1964839/how-can-i-create-a-please-wait-loading-animation-using-jquery)瞭解如何創建一個加載使用jQuery的動畫。對於彈出使用[jQuery對話框](https://jqueryui.com/dialog/) – ViVi