扩展自 $.fn.combo.defaults。 用 $.fn.combobox.defaults 重写了 defaults。

依赖
combo
用法
<select id=”cc” name=”dept” style=”width:200px;”>
<option value=”aa”>aitem1</option>
<option>bitem2</option>
<option>bitem3</option>
<option>ditem4</option>
<option>eitem5</option>
</select>
<input id=”cc” name=”dept” value=”aa”>
$(‘#cc’).combobox({
url:’combobox_data.json’,
valueField:’id’,
textField:’text’
});
json 数据格式的示例
[{
“id”:1,
“text”:”text1″
},{
“id”:2,
“text”:”text2″
},{
“id”:3,
“text”:”text3″,
“selected”:true
},{
“id”:4,
“text”:”text4″
},{
“id”:5,
“text”:”text5″
}]
特性
其特性扩展自 combo,下列是为combobox 增加的特性。
名称 | 类型 | 说明 | 默认值 |
valueField | string | 绑定到 ComboBox 的 value 上的基础数据的名称。 | value |
textField | string | 绑定到 ComboBox 的 text 上的基础数据的名称。 | text |
mode | string | 定义在文本改变时如何加载列表数据。如果组合框从服务器加载就设为 ‘remote’ 。 | local |










