EasyUI ComboBox默认值

combobox数据加载完后设置默认值

$('#ck').combobox({
url: '/External/GetAllCk',
valueField: 'Ddbh',
textField: 'Ddmc',
onLoadSuccess: function () { //加载完成后,设置选中第一项
var val = $(this).combobox("getData");
for (var item in val[0]) {
if (item == "Ddbh") {
$(this).combobox("select", val[0][item]);
}
}
}
});

posted @ 2015-03-24 20:03  JefferyZh  阅读(2335)  评论(0)    收藏  举报