标签:
具体效果如下图:
关键代码:
<tr>
<td class="query-conditions-row_left" width="20%">科室:</td>
<td>
<input id="DepartmentId" style="width: 90%" panelHeight="150" class="easyui-combobox" data-options="
valueField: ‘_Id‘,
textField: ‘Name‘,
url: ‘@Url.Content("~/Tooth/Department/QueryList")‘,
onSelect: function(rec){ @*当用户选择一个列表项时触发*@
var url = ‘@Url.Content("~/Tooth/Projects/QueryList")?id=‘+rec._Id; @*根据用户选择的一个列表项的id 查询数据库*@
$(‘#ProjectsId‘).combobox(‘reload‘, url);
}">
</td>
</tr>
<tr>
<td class="query-conditions-row_left" width="20%">项目:</td>
<td>
<input onfocus="focus1()" id="ProjectsId" class="easyui-combobox" style="width: 90%" panelHeight="150" data-options="textField:‘Name‘,
valueField:‘_Id‘,multiple:true, url:‘@Url.Content("~/Tooth/Projects/QueryList")‘" />@*首次查询所有项目*@
</td>
</tr>
帮助文档:http://www.jeasyui.net/plugins/169.html
jquery easyui Combobox 实现 两级联动
标签:
原文地址:http://www.cnblogs.com/weiqinshian/p/4861241.html