如何在 jQuery DataTables 中完全抑制表头? [英] How to suppress table headers completely in jQuery DataTables?

查看:18
本文介绍了如何在 jQuery DataTables 中完全抑制表头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 jQuery 的 DataTables 插件 (www.datatables.net) 在网页上显示表格.

I am using the DataTables plugin (www.datatables.net) for jQuery to display tables on a web page.

阅读文档并进行一些搜索后,我无法找到如何使用 DataTables 选项或 API 完全抑制或隐藏表头.

After reading through the documentation and doing some searches, I am unable to find out how to completely suppress or hide table headers, using the DataTables options or API.

推荐答案

你为什么不简单地通过 css 隐藏它们(我认为 datatables 需要一个 thead 部分才能工作)?

Why don't you simply hide them through css (i think datatables requires a thead section to work)?

.dataTables_wrapper table thead{
    display:none;
}

在这里摆弄:http://jsfiddle.net/LhZF3/

这篇关于如何在 jQuery DataTables 中完全抑制表头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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