<div class="fitem">
<label>所在城市:</label>
<input id="cityId" name="cityId" style="width:200px" class="easyui-combobox" >
</div>
<div class="fitem">
<label>所在区域:</label>
<input id="areaId" name="areaId" style="width:200px" class="easyui-combobox" >
</div>
$('#cityId').combobox({
url:'/yami/backend/city.getCityJson.do',
valueField:'id',
textField:'name',
width:200,
panelHeight:100,
editable:false,
required:true,
onChange:function(cityId){
if(cityId==null){
return;
}
$('#areaId').combobox('clear');
$('#areaId').combobox({
valueField:'id',
textField:'name',
url:'/yami/backend/area.getAreaJson.do?cityId='+cityId,
width:200,
panelHeight:100,
required:true,
editable:true//不可编辑。仅仅能选择
});
}
});