gpt4 book ai didi

javascript - 在html和jquery中隐藏一列

转载 作者:行者123 更新时间:2023-11-28 06:58:17 25 4
gpt4 key购买 nike

我试图在我的 View 中隐藏 ID th,我使用 jquery 数据表,有办法隐藏它吗?我不想在我的前端我的 html 和 JS 中看到它,如下所示。

HTML:

<thead>
<tr>
<th>Status</th>
<th>ID</th>
<th>Upload Date</th>
<th>File Name</th>
<th>Bank</th>
<th>Upload By</th>
<th>filepath</th>
<th>summarypath</th>
<th>ACTION</th>
</tr>
</thead>

JS:

"aoColumns": [
{ "sName": "FileStatus", "sClass": "left", "sWidth": "100px" },
{ "sName": "ID", "sClass": "left", "sWidth": "200px" },
{ "sName": "Crdt", "sClass": "left", "sWidth": "100px", "sType": "date" },
{ "sName": "FileName", "sClass": "left" },
{ "sName": "BankName", "sClass": "left", "sWidth": "100px" },
{ "sName": "Crid", "sClass": "left", "sWidth": "150px" },
{ "sName": "filepath", "sClass": "left", "sWidth": "10px", "bVisible": false },
{ "sName": "summarypath", "sClass": "left", "sWidth": "10px", "bVisible": false },
{ "sName": "", "sWidth": "100px", "bSearchable": false, "bSortable": false, "fnRender": function (oObj)

最佳答案

根据documentation ,你可以尝试:

"aoColumns": [
{ "sName": "FileStatus", "sClass": "left", "sWidth": "100px" },
{ "sName": "ID", "bVisible": false },
{ "sName": "Crdt", "sClass": "left", "sWidth": "100px", "sType": "date" },
// Following the code

关于javascript - 在html和jquery中隐藏一列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32379526/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com