當前位置:成語大全網 - 新華字典 - 如何讓兩個easyui的combobox關聯

如何讓兩個easyui的combobox關聯

<tr>

<td>省份:</td>

<td><input class="easyui-combobox" name=”province” data-options="

method:'get',

mode:'remote',

url:'test/getProvinceList',

onSelect:function(rec){

$('[comboname=city]').combobox('clear');

$('[comboname=city]').combobox('reload', 'test/getCityListByProvince?id=' + rec.id);

},

onLoadSuccess:function(){

var value = $(this).combobox('getValue');

if(value != ''){

<span style="white-space:pre"> </span>$('[comboname=city]').combobox('reload', 'test/getCityListByProvince?id=' + $(this).combobox('getValue'));

}

}

">

</td>

<td>城市:</td>

<td><input class="easyui-combobox" panelHeight="auto" name="city" data-options="

prompt:'請先填入省份名稱'

">

</td>

</tr>