JQuery数据表如何使用OR逻辑在单列中搜索多个值 [英] JQuery datatable how to do search multiple value within single column using OR logic
本文介绍了JQuery数据表如何使用OR逻辑在单列中搜索多个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,关于Source的列索引为7.我想通过在搜索输入框中键入 A、B 来过滤掉 A 或 B 中的所有 Source 作为我的结果.A,B格式灵活,可以是A|B,A B.
for example, there is a column index of 7 about Source. I want to filter out all Source from A or B to be my result by typing A,B in the search input box. the format A,B is flexible, it can be A|B, A B.
感谢您的帮助.
推荐答案
使用正则表达式:https://datatables.net/forums/discussion/6946/multiple-filters-on-same-column
前往:http://www.datatables.net/release-datatables/examples/api/regex.html
- 在列中:列 - 办公室
- 输入:东京|伦敦
- 并检查:视为正则表达式
这篇关于JQuery数据表如何使用OR逻辑在单列中搜索多个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文