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]); 常 ...
随机推荐
- IOS 播放音频流媒体
#pragma mark - 加载播放数据 - (void)loadData:(NSString *)musicUrl { NSURL *playURL = [NSURL URLWithString: ...
- Caffe--solver.prototxt配置文件 参数设置及含义
####参数设置################### 1. ####训练样本### 总共:121368个batch_szie:256将所有样本处理完一次(称为一代,即epoch)需要:121368/ ...
- HADOOP之HIVE+MYSQL,HBASE+ZOOKEEPER
这个搞得有劲哈哈 继续...继续....
- Unity3D中的工具类
1.时间:Unity提供了Time类,这个类主要用来获取当前的系统时间. Time.time:从游戏开始后开始计时,表示截止目前共运行的游戏时间. Time.deltaTime:获取Update()方 ...
- OOP(面向对象编程)的一些特性
接口:接口是把公共实例(非静态)方法和属性结合起来,以封装特定功能的一个集合.一旦定义了接口,就可以在类中实现它.接口注意事项:接口不能单独存在.不能像实例化一个类那样实例化接口.另外,接口不能包含实 ...
- 自定义xcode文件模板
下面两个路径都可以用于放模板文件 1. /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Template ...
- apache2 httpd 基于域名的虚拟主机配置 for centos6X 和debian-8
全系统虚拟主机: for debian 系统的apache2 域名 虚拟主机
- Spark Accumulators
概述 Accumulator即累加器,与Mapreduce counter的应用场景差不多,都能很好地观察task在运行期间的数据变化,Spark中的Accumulator各task可以对Accumu ...
- tomcat 7配置数据库连接池,使用SQL Server2005实现
昨 天看了一些网上的tomcat数据库连接池配置的东西,但是一直没配好,主要原因是网上的文章几乎没有针对tomcat 7进行配置的,而且针对SQL SERVER的也不多,今天上午看了官方的文档,花了一 ...
- CentOS系统、Jdk、Tomcat安装实战
CentOS系统.Jdk.Tomcat安装实战 第一次接触Liunx系统,都说J2EE系统在Li ...