javascript 从数据库中获取数据的 jquery 多选下拉复选框?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17525568/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jquery multiselect dropdown check box which gets data from database?
提问by user755806
I have a requirement where in I need to display a dropdown check box as follows.
我有一个要求,我需要在其中显示一个下拉复选框,如下所示。
The data has to be pulled from datbase on type ahead.
数据必须从数据库中提前输入。
Is there any jquery plugin to accomplish this?
有没有jquery插件来完成这个?
回答by straeger
You could use select2 select-replacement. http://ivaynberg.github.io/select2/
您可以使用 select2 选择替换。http://ivaynberg.github.io/select2/
you can give an ajax property as an data aquire function which can load data from an remote resource. http://ivaynberg.github.io/select2/#ajax
您可以将 ajax 属性作为可以从远程资源加载数据的数据获取函数。 http://ivaynberg.github.io/select2/#ajax