我正在使用select2min.js下拉选择框。
在这里,它适用于单一下拉
<select>
<option>abc</option>
</select>
为此,它可以很好地使用
$("#myId0").select2({
data: []
});上面的代码。
如果我有下拉列表,并且它包含了添加按钮,那么在下拉列表中,搜索框就不会出现。
$scope.myList;包含通过使用$scope.myList获得相同功能的all my dropdowns.can。
发布于 2017-12-26 19:33:00
1.您需要将id转换为class
<select class="myId"></select>2.然后像这样修改代码:-
$(document).find(".myId").select2({
data: []
});https://stackoverflow.com/questions/47977913
复制相似问题