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

查看:194
本文介绍了如何完全抑制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隐藏它们(我认为数据表需要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天全站免登陆