技術(shù)匯總:第四章:使用Easyui做三級下拉列表
功能展示:
Easyui
功能代碼:
一級分類<select data-options="url:'getCatalog1',textField:'name',valueField:'id',
onSelect: function(rec){
var url = 'getCatalog2?catalog1Id='+rec.id;
$('#ctg2ForAttrList').combobox('clear');
$('#ctg2ForAttrList').combobox('reload', url);
}
" class="easyui-combobox" style="width: 100px"></select>
二級分類<select data-options="textField:'name',valueField:'id',
onSelect: function(rec){
var url = 'getCatalog3?catalog2Id='+rec.id;
$('#ctg3ForAttrList').combobox('clear');
$('#ctg3ForAttrList').combobox('reload', url);
}
" id="ctg2ForAttrList" class="easyui-combobox" style="width: 100px"></select>
三級分類<select data-options="textField:'name',valueField:'id'"
id="ctg3ForAttrList" class="easyui-combobox" style="width:
100px"></select>
<a href="javascript:reloadAttrList();" class="easyui-linkbutton"
data-options="iconCls:'icon-add',plain:true">刷新屬性</a>