如何在下拉列表中选择多个值 [英] how to select multiple values in a drop down Data tables

查看:298
本文介绍了如何在下拉列表中选择多个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很喜欢jquery和data表。我有一个下拉菜单,当用户选择一个值时,它将搜索数据并绘制一个表。这个搜索和绘制一个表都是数据表的默认属性。现在我想要用户可以选择多个值。



根据多重选择,搜索应该发生。我做了很多搜索,但没有得到任何东西。任何帮助将会欣赏!!



在此图像中,我从下拉列表中选择了一个值,并且基于两个条目填充在表上。现在我想在这个下拉列表中选择多个值,可能在使用复选框后,需要搜索才能使用两个选定的条目。

解决方案

我发布这个答案,因为它可能有所帮助。



jQuery MultiSelect是一个jQuery插件,可以将多选列表变成一个带有复选框的漂亮下拉列表。这个插件很容易使用,在网络表单中非常有用。您需要使用两个名为jquery.multiselect.css和jquery.multiselect.js的库。如果您将搜索使用J查询的多选的示例,您会发现很多链接,这将使您的数据表完美。对于搜索选项您需要将多个值传递给正在构建数据表的函数。详情请见下面的链接。



http://www.codexworld.com/multi-select-dropdown-list-with-checkbox-jquery/


I am new to jquery and Data tables. I have a drop down when user select one value it will search the data and draw a table.This search and drawing a table both are default properties of data tables. Now i want the user can select multiple value.

And based on the multiple selection the search should happen.I did lot of search on this but didn't get any thing. Any help will be appreciate !!

In this image i have selected one value from drop down and based on that two entries are populating on table. now i want to select multiple values here in this drop down , may be using check box after that need the search should work with both selected entries.

解决方案

I did this . I am posting this answer because it may be help some one.

jQuery MultiSelect is a jQuery plugin that turns a multiselect list into a nice dropdown list with checkboxes. This plugin is easy to use and very useful in web form. You need to use two library called jquery.multiselect.css and jquery.multiselect.js. if you will search examples of multi select using J query you will find many links and that will work perfect with your data tables. For search option You need to pass multiple value to the function which is constructing your data tables. See below link for details.

http://www.codexworld.com/multi-select-dropdown-list-with-checkbox-jquery/

这篇关于如何在下拉列表中选择多个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆