var table=$('#tableid');$('#tableid').on('click','thedeletebuton_id',function(event) { event.preventDefault(); var id=$(this).data('id'); // pass the id to the controller to delete using ajax $.ajax({type: "POST",url: "<?php echo base_url('your controller'); ?>",data: {id:id}, success: function(data){ table.ajax.reload(); /// reloads the table alert('Deleted');} }); });
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)