且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在下拉列表中选择多个值

更新时间:2022-12-02 14:58:47

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



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/