1 $('#combox_role').combobox({ 2 panelHeight: 100, 3 url: '../../Handler/GetComboxItems.ashx?type=0', 4 valueField: 'RoleId', 5 textField: 'RoleName', 6 onLoadSuccess: function () { 7 var oData = $(this).combobox('getData'); 8 for (var item in oData[0]) { 9 if (item == "RoleId") { 10 $(this).combobox("select", oData[0][item]); 11 } 12 } 13 } 14 });
还可以通过下面的方式绑定默认值