标签:easyui
<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//不可编辑,只能选择 }); } });
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:easyui
原文地址:http://blog.csdn.net/hackcoder/article/details/46895247