如何重新启用onChange我的多选下拉列表中的所有选定值.这里使用插件.试着使用以下但我认为我走错了路
$('#multiselect1').multiselect({
selectAllValue: 'multiselect-all',
enableCaseInsensitiveFiltering: true,
enableFiltering: true,
maxHeight: '300',
buttonWidth: '235',
onChange: function(element, checked) {
var brands = $('#multiselect1 option:selected');
var selection = [];
$(brands).each(function(index, brand){
selection.push(brand);
});
console.log(selection);
}
});
Run Code Online (Sandbox Code Playgroud)
找到了
$('#multiselect1').multiselect({
selectAllValue: 'multiselect-all',
enableCaseInsensitiveFiltering: true,
enableFiltering: true,
maxHeight: '300',
buttonWidth: '235',
onChange: function(element, checked) {
var brands = $('#multiselect1 option:selected');
var selected = [];
$(brands).each(function(index, brand){
selected.push([$(this).val()]);
});
console.log(selected);
}
});
Run Code Online (Sandbox Code Playgroud) 如何在Django(Python)中创建ListField,就像在Google App Engine(Python)中的ListProperty属性一样?我的数据是这样的列表:3,4,5,6,7,8
.
我必须定义什么属性以及如何从中获取值?