gpt4 book ai didi

jquery - oTable.fnFilter 不起作用

转载 作者:行者123 更新时间:2023-12-01 07:19:39 26 4
gpt4 key购买 nike

我想在数据表的 thead 中提供搜索并在其中实现搜索...但它不起作用...

$("#listings_row thead input").keyup( function () {
oTable.fnFilter( this.value, $(this).attr('id') );
} );

<thead style="background:none;border:none;" id="searchbox">
<tr class="search_box">
<th><input type="text" style="height:16px;" name="search_engine" value="Search engines" class="search_init" id="1" /></th>
</tr>
</thead>

http://jsfiddle.net/methew/u9654/3/

只有这一行无法正常工作...oTable.fnFilter( this.value, $(this).attr('id') );

最佳答案

关注id您的 <input它从 1 开始,而应该从 5

开始

您正在使用 id 的值对列进行排序...因此,由于您的 ids 从 1 开始,您将过滤器应用到了错误的列

Here a jsfiddle - quick and dirty working version

关于jquery - oTable.fnFilter 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15195900/

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