首页 > 代码库 > Easyui combobox

Easyui combobox

获取数据方法一:

$(‘#countUnit‘).combobox({

data:com_countUnit,

editable:false,

cache: false,

panelHeight: ‘auto‘,

valueField:‘id‘,

textField:‘text‘,

multiple:true //多选 multiple:false单选

}).combobox(‘selectedIndex‘,0);

//默认选择第一行 单选赋值:

$(‘#countUnit‘).combobox(‘setValue‘,"123");

多选赋值:

$(‘#countUnit‘).combobox(‘setValues‘,‘123,466,789‘.split(‘,‘));

 

获取数据方法二:

$("#search").combobox({ valueField:‘value‘, textField:‘text‘ });

$("#search").combobox(‘loadData‘,data.comm[i].sub);

 

获取数据方法三:
$("#search_companyName").combobox({ url:‘bs-ui/ecp/MemberManageAction!queryCompanyNameList.bs‘, valueField:‘id‘, textField:‘name‘, });

Easyui combobox