js代码
<script type="text/javascript"> var data=[ { "id": 1, "text": 1 }, { "id": 2, "text": 2 }, { "id": 3, "text": 3 }, { "id": 4, "text": 4 }] //例子1 //单选 $('#demo1').comboboxfilter({ url: '', scope: 'FilterQuery1', data:data, onChange:function(newValue){ $('#demo_value').val(newValue); } }); $('#demo2').comboboxfilter({ url: '', scope: 'FilterQuery2', multiple: true, data:data, onChange:function(newValue){ $('#demo_value').val(newValue); } }); $('#demo3').comboboxfilter({ url: '', scope: 'FilterQuery3', data:data, onChange:function(newValue){ $('#demo_value').val(newValue); } }); $('#demo4').comboboxfilter({ url: '', scope: 'FilterQuery3', multiple: true, data:data, onChange:function(newValue){ $('#demo_value').val(newValue); } }); $('#demo5').comboboxfilter({ url: '', scope: '', unlimitText:'全部', data:data, onChange:function(newValue){ $('#demo_value').val(newValue); } }); $('#demo6').comboboxfilter({ url: '', scope: '', unlimitText:'全部', multiple: true, data:data, onChange:function(newValue){ $('#demo_value').val(newValue); } }); </script>