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]); 常 ...
随机推荐
- Scala学习笔记--特质trait
http://outofmemory.cn/scala/scala-trait-introduce-and-example 与Java相似之处 Scala类型系统的基础部分是与Java非常相像的.Sc ...
- Jasper_crosstab_group _Error incrementing crosstab dataset
error detail: net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeExceptio ...
- qt 拖拽 修改大小(使用了nativeEvent和winEvent)
http://www.cnblogs.com/swarmbees/p/5621543.html http://blog.sina.com.cn/s/blog_9e59cf590102w3r6.html
- (1) 一个字符串,根据输入参数m,找出字符串的m个字符的所有字符串
/** * 有一个字符串,根据输入参数m,找出字符串的m个字符的所有字符串 例如: String str ="abc", m=2 得到结果是 "ab" &quo ...
- poj1305:概念水题
了解一下毕达哥拉斯三元组概念= = 暴力求出所有的本源三元组即可 代码: #include <iostream> #include <stdio.h> #include< ...
- Install and configure sql server 2008 express
http://www.symantec.com/connect/articles/install-and-configure-sql-server-2008-express
- Android——LayoutInflater详解
在实际工作中,事先写好的布局文件往往不能满足我们的需求,有时会根据情况在代码中自定义控件,这就需要用到LayoutInflater. LayoutInflater在Android中是"扩展& ...
- ASP.NET简单文件上传
一>使用FileUpload控件,将其拖入页面: <%@ Page Title="hehe" Language="C#" MasterPageFil ...
- JAVA模拟表单提交
这是我网上搜的,自己使用也蛮方便,所以上传供大家分享. package wzh.Http; import java.io.BufferedReader; import java.io.IOExce ...
- WebGIS在行业中应用的演变
结合我本身的项目及WebGIS在公检法行业中的应用,对此作了一个演变过程的总结: 第一阶段:GIS基本功能的应用:Data Show(数据展示):Search(搜索):Search b ...