简体   繁体   English

jQuery Datatables-匹配过滤词

[英]jQuery Datatables - match filtering words

I am using jQuery datatables and was hoping someone knew how to do this. 我正在使用jQuery数据表,希望有人知道如何做到这一点。

We have items in the database listed as 4x4 and 4wd. 我们在数据库中列出了4x4和4wd项目。 I would like it to also retrieve 4wd when I type in 4x4 and visa versa. 我希望当我输入4x4时也能检索4wd,反之亦然。

Thanks for your help in advance. 感谢您的帮助。

Andy 安迪

One solution will be to have a hidden column (see bVisible ) and add the alternate description in that column. 一种解决方案是拥有一个隐藏列(请参见bVisible ),然后在该列中添加替代描述。 (In your case, where the result is 4x4 then in the hidden column it would be 4wd and the other way around). (在您的情况下,结果为4x4,则在隐藏列中为4wd,反之亦然)。 So when you search you will get both results 因此,当您搜索时,您将同时获得两个结果

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM