需要在数据表标题中显示自定义信息消息,是否有任何内置选项? [英] Need to show custom info message in data table header , is there any in built option?

查看:44
本文介绍了需要在数据表标题中显示自定义信息消息,是否有任何内置选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在datatable标头中添加自定义信息。请参考下面的图片以获取更多参考。

I need to add custom info in datatable header.Please refer below pic for more reference.

任何想法如何实现此目标?

Any idea how to achieve this ?

推荐答案

您可以通过插入 DataTable的DOM定位中的自定义元素


DataTables在表周围插入DOM元素以控制DataTables功能,并且您也可以利用此机制来插入自己的自定义元素。

DataTables inserts DOM elements around the table to control DataTables features, and you can make use of this mechanism as well to insert your own custom elements.

例如:

$('#example').DataTable( {
   "dom": '<"toolbar">frtip'
} );

$("div.toolbar").html('<b>Custom tool bar! Text/images etc.</b>');

请参阅此示例进行演示。

这篇关于需要在数据表标题中显示自定义信息消息,是否有任何内置选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆