juqery easy ui 实现二级菜单联动
实现效果

代码:
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript">
$(document).ready(function () {
//保存附件(新增/修改)
$("#btnSave").click(function () {
$("#BackReason").attr("value", $('#SecBackReason').combogrid("getValue"));
$("#DetailReason").attr("value", $('#SecDetailReason').combogrid("getValue"));
$("#form1").attr("action", "ClientInterCourseAdd");
$("#form1").submit(); // 如果是协同则还要发送邮件
if ($('#interType').combogrid("getValue") == "11") { var to = $("#interTypeMail").val();
var body = $('#SecBackReason').combogrid("getText");
$.ajax({
type: "POST",
url: "/Mail/MailAdd?level=1&spType=1&drpMailTo=" + to,
data: "To=" + to + "&Subject="+body+"&Body=" + body,
success: function (msg) {
alert("Data Saved: " + msg);
}
});
} }); // 显示二级菜单
$('#interType').combobox({
onChange: function (newValue, oldValue) { // 专家咨询
if (newValue == "3") {
var id = $('#ID').val();
var url = "/Client/AddExpertConsult?interCourseID=" + id;
ws.base.showDialog({ url: url, width: "700px", height: "450px" });
}
else {
$('#SecBackReason').combobox({
url: '/Client/GetCodeListByType1?type=Package&id=' + newValue,
valueField: 'DetailCode',
textField: 'DetailName'
});
} }
});
// 显示三级菜单
$('#SecBackReason').combobox({
onChange: function (newValue, oldValue) {
$('#SecDetailReason').combobox({
url: '/Client/GetCodeListByType2?type=Commissioner&id=' + newValue,
valueField: 'DetailCode',
textField: 'DetailName'
});
}
}); }); </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<form id="form1" runat="server">
<input type="hidden" id="hfDisease" name="DiseaseArr" />
<input type="hidden" id="hfProduct" name="ProductArr" />
<input type="hidden" id="hfMg" name="MGArr" />
<input type="hidden" id="hfGnc" name="GncArr" />
<input type="hidden" id="ckbox" />
<div class="body-wrap">
<div class="title clearfix">
<div class="popup">
<div class="title clearfix" id="tbTop">
<div class="f-left">
<span class="icon-arrow iblk"></span><span class="iblk text">客户交流记录新增</span></div>
</div>
<div class="table" style="width: 100%">
<table style="width: 100%">
<colgroup>
<col width="80" />
<col width="170" />
<col width="80" />
<col width="170" />
<col width="80" />
<col width="170" />
</colgroup>
<tbody>
<tr>
<td class="title" align="right">
交流方法:
</td>
<td align="left">
<input id="ID2" name="ID2" type="hidden" value="00000000-0000-0000-0000-000000000000" />
<%:Html.HiddenFor(model=>model.ClientID) %>
<%:Html.HiddenFor(model=>model.ID) %>
<%:Html.Hidden("interTypeMail", WS.Base.App.Business.CodeBusiness.GetCode("interTypeMail",
"1").DetailName)%>
<%:Html.DropDownList("InterMethod", WS.Base.App.Business.CodeBusiness.GetCode("interMethod",
"", true), new { @class = "easyui-combobox", style = "width:150px;", panelHeight = "auto" })%>
</td>
<td class="title" align="right">
交流时间:
</td>
<td align="left">
<%:Html.TextBoxFor(model=>model.InterTime)%>
</td>
<td class="title" align="right">
交流时长:
</td>
<td align="left">
<%:Html.TextBoxFor(model => model.InterTimeLen)%>
</td>
</tr>
<tr>
<td class="title" align="right">
交流类型:
</td>
<td align="left" colspan="6">
<%:Html.DropDownList("interType", WS.Base.App.Business.CodeBusiness.GetCode("interType",
"", true), new { @class = "easyui-combobox", style = "width:150px;", panelHeight = "auto" })%>
<input id="SecBackReason" name="language" style="display: none;" />
<%: Html.HiddenFor(model=>model.BackReason) %>
<input id="SecDetailReason" name="language" style="display: none;" />
<%: Html.HiddenFor(model=>model.DetailReason) %>
</td>
</tr>
<tr>
<td class="title" align="right">
备注:
</td>
<td>
<textarea rows="2" cols="5" id="remark" style="width: 600px;" class="text-box"></textarea>
</td>
</tr>
</tbody>
</table>
<br />
<br />
</div>
</div>
<div style="text-align: center; padding-top: 6px">
<a href="#" class="btn"><span class="in">
<input type="button" value="保存" id="btnSave" name="btnSave" /></span></a> <a href="#"
class="btn"><span class="in">
<input type="button" id="btnClose" style="width: 60px" onclick="window.close();"
value="取消" /></span></a>
</div>
<div style="height: 22px;">
</div>
</div>
</div>
</form>
</asp:Content>
juqery easy ui 实现二级菜单联动的更多相关文章
- 省市联动_简单的Demo,适用于各种二级菜单联动
		最近搞了一个功能,是查询页面需要用到二级菜单联动,获取到选中的属性value传入到后台. 平常都是用AJAX或者JQuery ,通过XML或者JSON的方式,这样的话需要调用数据库,像典型得到省市联动 ... 
- JavaScript(jquery)实现二级菜单联动
		为什么写这篇随笔? 二级菜单的联动一直是我心中一块石头,犹记得大一的时候只会用一点的Dreamweaver,当时做二级菜单难受啊,啥都不会,网上找了些资料,也看不懂别人的代码更别说用起来了 前些日子. ... 
- Ajax和JSON完成二级菜单联动的功能
		首先需要找好JSON的包哦: 链接:http://pan.baidu.com/s/1jH6gN46 密码:lbh1 1:首先创建一个前台页面,比如secondMenu.jsp,源码如下所示: < ... 
- Excel实现二级菜单联动
		项目中需要导入一个Excel模板需要实现二级联动,现记录如下: 首先看一下原始数据,原始信息在一张工作表,第一行是省市名称,下面的若干行为对应省市下面的地名和区名.需要在另外一张工作表中A列和B列建立 ... 
- Struts2二级菜单联动
		http://www.cnblogs.com/wujixing/p/5194461.html ps: Java面试 http://blog.csdn.net/zhang070809/article/d ... 
- jQuery Easy UI 开发笔记
		1.jQuery Easy UI主要的运行原理是通过核心的代码调用插件来实现UI效果的 2.jQuery Easy UI插件与插件之间的关系是: 一.独立式插件: 独立式插件是指:不与其他的插件具有相 ... 
- JQuery Easy Ui dataGrid 数据表格 ---制作查询下拉菜单
		JQuery Easy Ui dataGrid 数据表格 数据表格 - DataGrid 继承$.fn.panel.defaults,使用$.fn.datagrid.defaults重载默认值.. 数 ... 
- Struts2 easy UI插件
		一.easy UI是类似于jQuery UI的插件库,它提供了丰富的各种常用插件:tree.datagrid... tree插件: 语法:$(selector).tree([settings]); 常 ... 
- Easy UI常用插件使用
		一.easy UI是类似于jQuery UI的插件库,它提供了丰富的各种常用插件:tree.datagrid... tree插件: 语法:$(selector).tree([settings]); 常 ... 
随机推荐
- ubuntu12.04安装jdk-7u79-linux-i586.tar.gz
			第一步:下载jdk-7u79-linux-i586.tar.gz 1.wget -c http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux ... 
- 怎样制作百度recovery【转】
			由于recovery的硬件相关性比较强,使得recovery的通用性不强,项目组为了降低整个开发的难度,coron项目里面默认是编译生成百度recovery的. 不过还是有很多开发者问私下我,怎样制作 ... 
- 防止DC电源反接的方法——SS14的用法
			出处:http://blog.ednchina.com/tengjingshu 电源是PCB板的重要部分,每个芯片都需要电源供给.芯片其实是挺脆弱的,只要正负接反得话,大多数就会挂掉,相信很多人都有惨 ... 
- HTTP 504 错误
			5xx(服务器错误)这些状态代码表示,服务器在尝试处理请求时发生内部错误.这些错误可能是服务器本身的错误,而不是请求出错. 504(网关超时) 服务器作为网关或代理,未及时从上游服务器接收请求. 50 ... 
- spring与数据库之间的配置
			spring 配置数据源的三种方式 1.使用org.springframework.jdbc.datasource.DriverManagerDataSource配置文件: <bean id=& ... 
- Android驱动之 Linux Input子系统之TP——A/B(Slot)协议
			将A/B协议这部分单独拿出来说一方面是因为这部分内容是比较容易忽视的,周围大多数用到input子系统的开发人员也不甚理解:另一方面是由于这部分知识一旦扩展到TP(触摸屏Touch Panel)的多点触 ... 
- c语言结构体1之定义
			这是在复习阶段随便小结的一些东西 别喷哦 结构体定义的三种方式 注意事项: 1结构体括号后面有分号 2#define得放在程序上面 3成员名可以和结构体名相同 4结构体类型不能直接访问成员,也不能赋值 ... 
- WPF - Build Error总结
			1. are you missing an assembly reference 给项目添加新控件的时候,经常发现这种错误 Error 21 The type or namespace name 'C ... 
- java_final
- StoryBoard 加入一个自定义View
			1. 建一个 UIView的子类(MyView.h/MyView.m) 2. 建一个 View类型的XIB 3. 把xib的file‘s owner设为MyView 4. 在.h文件里加上 @prop ... 
