You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
4 years ago
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
|
||
|
|
||
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
||
|
Combobox自定义样例
|
||
|
</asp:Content>
|
||
|
|
||
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||
|
<script language=javascript type="text/javascript">
|
||
|
$(function () {
|
||
|
$('#ddl1').combobox({
|
||
|
url: '/Examples/GetComboboxList1',
|
||
|
editable: 'false',
|
||
|
valueField: 'UserID',
|
||
|
textField: 'UserDes',
|
||
|
onSelect: function () {
|
||
|
var val = $('#ddl1').combobox('getValue');
|
||
|
$('#ddl2').combobox({
|
||
|
url: '/Examples/GetComboboxList2?userID='+val,
|
||
|
editable: 'false',
|
||
|
valueField: 'ID',
|
||
|
textField: 'RoleID'
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
})
|
||
|
</script>
|
||
|
<h2>Combobox</h2>
|
||
|
<table>
|
||
|
<tr><td>静态</td>
|
||
|
<td>
|
||
|
<select id="cbx1" class="easyui-combobox" name="cbx1" style="width:200px;" editable="false" required="true">
|
||
|
<option value="1">item1</option>
|
||
|
<option value="2">item2</option>
|
||
|
<option value="3">item3</option>
|
||
|
</select>
|
||
|
</td></tr>
|
||
|
<tr><td>动态</td>
|
||
|
<td>
|
||
|
<input class="easyui-combobox"
|
||
|
name="language"
|
||
|
url="/Examples/GetComboboxList1"
|
||
|
editable="false"
|
||
|
valueField="UserID"
|
||
|
textField="UserDes"
|
||
|
value="1"
|
||
|
multiple="false"
|
||
|
panelHeight="auto" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr><td>联动</td>
|
||
|
<td> <input id="ddl1" class="easyui-combobox" style="width:200px;"
|
||
|
name="ddl1" />
|
||
|
|
||
|
<input id="ddl2" class="easyui-combobox" style="width:200px;"
|
||
|
name="ddl2" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
</asp:Content>
|
||
|
|
||
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
||
|
</asp:Content>
|