首页 > 其他 > 详细

datatable 表头增加搜索

时间:2020-06-15 18:36:38      阅读:147      评论:0      收藏:0      [点我收藏+]
 1 $(‘#table thead tr‘).clone(true).appendTo(‘#table_box thead‘);
 2 $(‘#table thead tr:eq(1) th‘).each( function (i) {
 3         var title = $(this).text();
 4         var index = $(this).index();
 5         var enVal = columns[index].enVal;
 6         // 列搜索
 7         $(this).html(‘<input type="text" style="width:100%;" class="column_search_input" data-column="‘+ index +‘" data-en="‘+enVal+‘"/>‘);
 8         $(‘input‘, this).on( ‘keyup change‘, function (e) {
 9             代码code
11         })        
13 })

 

datatable 表头增加搜索

原文:https://www.cnblogs.com/fyjz/p/13132309.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!