【发布时间】:2021-01-13 18:28:45
【问题描述】:
目前我的 jQuery 数据表看起来像这样:
我希望历史标题和搜索栏在同一行。
我已经实现了这样的标题和表格:
<h2>History</h2>
<table class="table" id="history_tbl" style="width:100%">
<thead>
<tr>
...
</tr>
</thead>
<tbody>
@for (var i = 1; i < M.Count(); i++)
{
<tr>
...
</tr>
}
</tbody>
</table>
以及数据表的以下规范:
$("#history_tbl").DataTable({
"columns": [
{ searchable: false },
null,
{ searchable: false },
{ searchable: false },
{ searchable: false },
{ searchable: false },
{ searchable: false }
],
ordering: false,
paging: true,
lengthChange: false,
language: {
searchPlaceholder: "Search names",
search: ""
}
});
我已经看到我可以通过添加 DOM 来改变一些东西,但我不太确定我需要什么。
感谢您的帮助!
【问题讨论】:
标签: javascript c# jquery asp.net-mvc datatables