- 浏览: 55553 次
-
文章分类
- 全部博客 (87)
- 模糊查询 (1)
- 树查询 (1)
- 汉字文件编码 (1)
- 图片文件写入网页 (1)
- 网络爬虫 (1)
- 正则表达式实现IP排序 (1)
- javax读取xml (1)
- javax增删改查xml (1)
- java反射 (1)
- dom4j操作XML文件 (1)
- descode函数 (1)
- 用户在线管理 (1)
- oracle统计函数统计各个年份入职的人数 (1)
- js解绑时间和自定义时间 (1)
- extjs 树控件开发 (1)
- java导出excel (1)
- java导入excel... (1)
- 行转列 (1)
- 连接池 (1)
- oracle plsql (0)
- oracle (1)
- oracle存储过程 (5)
- plsql编程 (5)
- oracle触发器 (2)
- oracle知识 (1)
- web技术 (22)
- servle+jspt文件下载 (0)
- wen技术 (0)
- java连接池 (1)
- java基础 (10)
- weblogic (3)
- jstl标签库的使用 实例 (1)
- css技术 (1)
- 存储过程 (1)
- sql统计 (1)
- webservice技术 (5)
- spring框架总结 (1)
- mongoDB (1)
- 64位oracle安装plsql (1)
- mongoDB分组统计 (1)
- ssh 无密码登录 (0)
- mysql (1)
- hadoop (0)
- lucene (1)
最新评论
<%@page import="java.util.Map"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@taglib uri="/WEB-INF/struts-nested.tld" prefix="nested"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@page import="com.ist.util.db.Result"%>
<%
String deptcode = (String) request.getSession().getAttribute(
"deptcode");
int depttype = Integer.parseInt((String) request.getSession()
.getAttribute("depttype")); //一级部门
String reportid = request.getParameter("reportid");
String[] deptTitle = new String[] { "省", "市", "县/区", "支" };
String title0 = "";
String title1 = null;
String title2 = null;
String title3 = null;
if (1 == depttype) { //一级部门
title0 = "全省";
title1 = "市";
title2 = "县";
title3 = "支";
} else { //不是省级部门
if (depttype < deptTitle.length)
title1 = deptTitle[depttype];
if (depttype < deptTitle.length - 1)
title2 = deptTitle[depttype + 1];
if (depttype < deptTitle.length - 2)
title3 = deptTitle[depttype + 2];
if (title1 != null)
title0 = "全" + deptTitle[depttype - 1];
}
%>
<html>
<title>营业环节结算支出表</title>
<script src="/js/cssjs.js" type="text/javascript"></script>
<script src="/js/zfwl.js" type="text/javascript"></script>
<script src="/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
function lstLowLowerDept(lowerDeptObj,lowerLowDeptObj){
lowerLowDeptObj.options.length = 0;
var o = lowerDeptObj.options; //上级机构长度
for(var i=0; i<o.length; i++) {
if(o[i].selected) { //选中第几行
var deptCode=o[i].value;
var strUrl = "/report.do?command=QueryInfo&deptCode="+deptCode+"&reportid=<%=reportid%>" ;
jQuery.ajax({
type : "POST",
async: false,
url :strUrl,
data : "",
success : function callback(data) {
var optionValue= eval("("+data+")");
for(var i=0;i<optionValue.length;i++){
lowerLowDeptObj.options.add(new Option(optionValue[i].deptName,optionValue[i].deptCode)); //添加新的option
}
}
});
}
}
}
//js数组 三个标题
var deptTitle = new Array("<%=title1%>","<%=title2%>","<%=title3%>");
function getForm() {
return reportForm;
}
function doSubmit(no) {
var theForm = getForm();
var html = "";
if(no != 0) { //不是查询qua'she
// var deptObj = no==1? theForm.dept1:theForm.dept2;
var deptObj=null;
if(no==1){
deptObj= theForm.dept1;
}else if(no==2){
deptObj= theForm.dept2;
}else{
deptObj= theForm.dept3;
}
for(var i=0; i<deptObj.options.length; i++) {
if(deptObj.options[i].selected) {
html += "<input type='hidden' name='dept' value='"+deptObj.options[i].value.substring(deptObj.options[i].value.indexOf("|")+1)+"'>";
}
}
if(html=="") {
alert("请选择" + deptTitle[no-1] + "机构!");
return;
}
//查询第一个机构列表,且第二个机构列表存在
//则进入报表页面后还可继续往下查
if(no==1 && deptTitle[1]!="null") theForm.hasLower.value = "1";
else theForm.hasLower.value = "0";
}
else { //查询全省
html = "<input type='hidden' name='dept' value='<%=deptcode%>'>";
if(deptTitle[0]=="null" && deptTitle[1]=="null") theForm.hasLower.value = "0";
else {
if(deptTitle[0]!="null") theForm.hasLower.value = "1";
if(deptTitle[1]!="null") theForm.hasLower.value = "2";
}
}
document.all["deptDiv"].innerHTML = html;
openProcessBar();
theForm.submit();
}
function clearLowerLowdept(lowLowerDept){
lowLowerDept.options.length=0;
}
</script>
<link href="/css/themes/spread.css" rel="stylesheet" type="text/css"></link>
<link href="/css/themes/default.css" rel="stylesheet" type="text/css"></link>
<link href="/css/themes/alphacube.css" rel="stylesheet" type="text/css"></link>
<link href="/css/themes/alert.css" rel="stylesheet" type="text/css">
</link>
<link href="/css/themes/alert_lite.css" rel="stylesheet"
type="text/css">
</link>
<script type="text/javascript" src="/js/prototype/prototype.js"> </script>
<script type="text/javascript" src="/js/prototype/window.js"> </script>
<link href="/css/zfwl.css" type=text/css rel=STYLESHEET>
</HEAD>
<body vlink=#000000 alink=#000000 link=#000000 bgColor=#ffffff>
<html:form action="/report.do" method="post">
<input type="hidden" name="command" value="Query">
<input type="hidden" name="hasLower" value="0">
<input type="hidden" id="reportid" name="reportid" value="<%=reportid%>">
<div id="deptDiv"></div>
<!-- 标题栏 -->
<div class=SectionTabTopBorder style="DISPLAY: block">
</div>
<div class=SectionTabBackground id=idSectionTabBackground
style="DISPLAY: block">
<table style="HEIGHT: 2em" border=0>
<tr>
<td class=TabCell>
<font class="beta" size="2"> <b>营业环节结算</b>
<span class="bg-neg-alert">»</span>
<b>营业环节结算支出表</b> </font>
</td>
</tr>
</table>
</div>
<!-- 查询栏 -->
<table cellspacing=0 bordercolordark=#ffffff cellpadding=3
width="100%" align=center bordercolorlight=#000000 border=1>
<!-- 第一行 -->
<tr>
<td class="beta" style="font-weight:bold" width="60px">
结算周期:
</td>
<td colspan=10>
<logic:present name="lstSettlePeriod">
<html:select property="settlePeriod" style="width:130px">
<html:options collection="lstSettlePeriod" property="value"
name="LabelValueBean" labelProperty="label" />
</html:select>
</logic:present>
</td>
</tr>
<%
if (title1 != null || title2 != null|| title3 != null) {
%>
<!--tr2-->
<tr>
<!--左边机构栏-->
<!--td1-->
<td class="beta" style="font-weight:bold" width="80px">
<%=title1%>
局:
</td>
<!--td2-->
<td>
<select name="dept1" style="width:180px;height:200px"
multiple="true"
onchange="lstLowerDept(getForm().dept1,getForm().dept2,lowerDeptArray),clearLowerLowdept(getForm().dept3)">
<%
Result cityDept = (Result) request.getAttribute("lstLowerDept");
if (cityDept != null) {
for (int i = 0; i < cityDept.size(); i++) {
%>
<option
value="<%=cityDept.getValue(i, "dept_id") + "|"
+ cityDept.getValue(i, "dept_code")%>">
<%=cityDept.getValue(i, "dept_name")%>
</option>
<%
}
}
%>
</select>
<br>
全选
<input type="checkbox"
onclick="selectAll(getForm().dept1);lstLowerDept(getForm().dept1,getForm().dept2,lowerDeptArray)" />
<input type="button" value=" 查 询 " onclick="doSubmit(1)">
</td>
<!--右边机构栏-->
<%
if (title2 != null) {
%>
<td class="beta" style="font-weight:bold" width="80px">
<%=title2%>
局:
</td>
<td>
<select name="dept2" style="width:180px;height:200px"
multiple="true"
onchange="lstLowLowerDept(getForm().dept2,getForm().dept3)">
</select>
<br>
全选
<input type="checkbox" onclick="selectAll(getForm().dept2);" />
<input type="button" value=" 查 询 " onclick="doSubmit(2)">
</td>
<%
}
%>
<%
if (title3!= null) {
%>
<td class="beta" style="font-weight:bold" width="80px">
<%=title3 %>
局:
</td>
<td>
<select name="dept3" style="width:180px;height:200px"
multiple="true">
</select>
<br>
全选
<input type="checkbox" onclick="selectAll(getForm().dept3);" />
<input type="button" value=" 查 询 " onclick="doSubmit(3)">
</td>
<%
}
%>
</tr>
<%
}
%>
</table>
<input type="button" value=" 查询<%=title0%> " onclick="doSubmit(0)">
</html:form>
</body>
</html>
<script>
var lowerDeptArray = new Array();
<%
Result cityDept = (Result)request.getAttribute("lstLowlowerDept");
if(cityDept !=null) {
for(int i=0; i<cityDept.size(); i++) {
%>
lowerDeptArray.push(new Dept("<%=cityDept.getValue(i, "upper_dept_id")%>","<%=cityDept.getValue(i, "dept_id") + "|"
+ cityDept.getValue(i, "dept_code")%>","<%=cityDept.getValue(i, "dept_name")%>"));
<%
}
}
%>
//放第二个菜单的内容
</script>
<%@page import="java.util.List"%>
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@taglib uri="/WEB-INF/struts-nested.tld" prefix="nested"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@page import="com.ist.util.db.Result"%>
<%
String deptcode = (String) request.getSession().getAttribute(
"deptcode");
int depttype = Integer.parseInt((String) request.getSession()
.getAttribute("depttype")); //一级部门
String reportid = request.getParameter("reportid");
String[] deptTitle = new String[] { "省", "市", "县/区", "支" };
String title0 = "";
String title1 = null;
String title2 = null;
String title3 = null;
if (1 == depttype) { //一级部门
title0 = "全省";
title1 = "市";
title2 = "县";
title3 = "支";
} else { //不是省级部门
if (depttype < deptTitle.length)
title1 = deptTitle[depttype];
if (depttype < deptTitle.length - 1)
title2 = deptTitle[depttype + 1];
if (depttype < deptTitle.length - 2)
title3 = deptTitle[depttype + 2];
if (title1 != null)
title0 = "全" + deptTitle[depttype - 1];
}
%>
<html>
<title>营业环节结算支出表</title>
<script src="/js/cssjs.js" type="text/javascript"></script>
<script src="/js/zfwl.js" type="text/javascript"></script>
<script src="/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
function lstLowLowerDept(lowerDeptObj,lowerLowDeptObj){
lowerLowDeptObj.options.length = 0;
var o = lowerDeptObj.options; //上级机构长度
for(var i=0; i<o.length; i++) {
if(o[i].selected) { //选中第几行
var deptCode=o[i].value;
var strUrl = "/report.do?command=QueryInfo&deptCode="+deptCode+"&reportid=<%=reportid%>" ;
jQuery.ajax({
type : "POST",
async: false,
url :strUrl,
data : "",
success : function callback(data) {
var optionValue= eval("("+data+")");
for(var i=0;i<optionValue.length;i++){
lowerLowDeptObj.options.add(new Option(optionValue[i].deptName,optionValue[i].deptCode)); //添加新的option
}
}
});
}
}
}
//js数组 三个标题
var deptTitle = new Array("<%=title1%>","<%=title2%>","<%=title3%>");
function getForm() {
return reportForm;
}
function doSubmit(no) {
var theForm = getForm();
var html = "";
if(no != 0) { //不是查询qua'she
// var deptObj = no==1? theForm.dept1:theForm.dept2;
var deptObj=null;
if(no==1){
deptObj= theForm.dept1;
}else if(no==2){
deptObj= theForm.dept2;
}else{
deptObj= theForm.dept3;
}
for(var i=0; i<deptObj.options.length; i++) {
if(deptObj.options[i].selected) {
html += "<input type='hidden' name='dept' value='"+deptObj.options[i].value.substring(deptObj.options[i].value.indexOf("|")+1)+"'>";
}
}
if(html=="") {
alert("请选择" + deptTitle[no-1] + "机构!");
return;
}
//查询第一个机构列表,且第二个机构列表存在
//则进入报表页面后还可继续往下查
if(no==1 && deptTitle[1]!="null") theForm.hasLower.value = "1";
else theForm.hasLower.value = "0";
}
else { //查询全省
html = "<input type='hidden' name='dept' value='<%=deptcode%>'>";
if(deptTitle[0]=="null" && deptTitle[1]=="null") theForm.hasLower.value = "0";
else {
if(deptTitle[0]!="null") theForm.hasLower.value = "1";
if(deptTitle[1]!="null") theForm.hasLower.value = "2";
}
}
document.all["deptDiv"].innerHTML = html;
openProcessBar();
theForm.submit();
}
function clearLowerLowdept(lowLowerDept){
lowLowerDept.options.length=0;
}
</script>
<link href="/css/themes/spread.css" rel="stylesheet" type="text/css"></link>
<link href="/css/themes/default.css" rel="stylesheet" type="text/css"></link>
<link href="/css/themes/alphacube.css" rel="stylesheet" type="text/css"></link>
<link href="/css/themes/alert.css" rel="stylesheet" type="text/css">
</link>
<link href="/css/themes/alert_lite.css" rel="stylesheet"
type="text/css">
</link>
<script type="text/javascript" src="/js/prototype/prototype.js"> </script>
<script type="text/javascript" src="/js/prototype/window.js"> </script>
<link href="/css/zfwl.css" type=text/css rel=STYLESHEET>
</HEAD>
<body vlink=#000000 alink=#000000 link=#000000 bgColor=#ffffff>
<html:form action="/report.do" method="post">
<input type="hidden" name="command" value="Query">
<input type="hidden" name="hasLower" value="0">
<input type="hidden" id="reportid" name="reportid" value="<%=reportid%>">
<div id="deptDiv"></div>
<!-- 标题栏 -->
<div class=SectionTabTopBorder style="DISPLAY: block">
</div>
<div class=SectionTabBackground id=idSectionTabBackground
style="DISPLAY: block">
<table style="HEIGHT: 2em" border=0>
<tr>
<td class=TabCell>
<font class="beta" size="2"> <b>营业环节结算</b>
<span class="bg-neg-alert">»</span>
<b>营业环节结算支出表</b> </font>
</td>
</tr>
</table>
</div>
<!-- 查询栏 -->
<table cellspacing=0 bordercolordark=#ffffff cellpadding=3
width="100%" align=center bordercolorlight=#000000 border=1>
<!-- 第一行 -->
<tr>
<td class="beta" style="font-weight:bold" width="60px">
结算周期:
</td>
<td colspan=10>
<logic:present name="lstSettlePeriod">
<html:select property="settlePeriod" style="width:130px">
<html:options collection="lstSettlePeriod" property="value"
name="LabelValueBean" labelProperty="label" />
</html:select>
</logic:present>
</td>
</tr>
<%
if (title1 != null || title2 != null|| title3 != null) {
%>
<!--tr2-->
<tr>
<!--左边机构栏-->
<!--td1-->
<td class="beta" style="font-weight:bold" width="80px">
<%=title1%>
局:
</td>
<!--td2-->
<td>
<select name="dept1" style="width:180px;height:200px"
multiple="true"
onchange="lstLowerDept(getForm().dept1,getForm().dept2,lowerDeptArray),clearLowerLowdept(getForm().dept3)">
<%
Result cityDept = (Result) request.getAttribute("lstLowerDept");
if (cityDept != null) {
for (int i = 0; i < cityDept.size(); i++) {
%>
<option
value="<%=cityDept.getValue(i, "dept_id") + "|"
+ cityDept.getValue(i, "dept_code")%>">
<%=cityDept.getValue(i, "dept_name")%>
</option>
<%
}
}
%>
</select>
<br>
全选
<input type="checkbox"
onclick="selectAll(getForm().dept1);lstLowerDept(getForm().dept1,getForm().dept2,lowerDeptArray)" />
<input type="button" value=" 查 询 " onclick="doSubmit(1)">
</td>
<!--右边机构栏-->
<%
if (title2 != null) {
%>
<td class="beta" style="font-weight:bold" width="80px">
<%=title2%>
局:
</td>
<td>
<select name="dept2" style="width:180px;height:200px"
multiple="true"
onchange="lstLowLowerDept(getForm().dept2,getForm().dept3)">
</select>
<br>
全选
<input type="checkbox" onclick="selectAll(getForm().dept2);" />
<input type="button" value=" 查 询 " onclick="doSubmit(2)">
</td>
<%
}
%>
<%
if (title3!= null) {
%>
<td class="beta" style="font-weight:bold" width="80px">
<%=title3 %>
局:
</td>
<td>
<select name="dept3" style="width:180px;height:200px"
multiple="true">
</select>
<br>
全选
<input type="checkbox" onclick="selectAll(getForm().dept3);" />
<input type="button" value=" 查 询 " onclick="doSubmit(3)">
</td>
<%
}
%>
</tr>
<%
}
%>
</table>
<input type="button" value=" 查询<%=title0%> " onclick="doSubmit(0)">
</html:form>
</body>
</html>
<script>
var lowerDeptArray = new Array();
<%
Result cityDept = (Result)request.getAttribute("lstLowlowerDept");
if(cityDept !=null) {
for(int i=0; i<cityDept.size(); i++) {
%>
lowerDeptArray.push(new Dept("<%=cityDept.getValue(i, "upper_dept_id")%>","<%=cityDept.getValue(i, "dept_id") + "|"
+ cityDept.getValue(i, "dept_code")%>","<%=cityDept.getValue(i, "dept_name")%>"));
<%
}
}
%>
//放第二个菜单的内容
</script>
发表评论
-
excel 导出及单元格合并
2014-08-13 16:00 616合并单元格类 public ActionForward do ... -
jsp动态生成table并且进行表头表列合并
2014-07-31 08:54 1517<%@page import="java.ut ... -
jsquery解析XMl文件二级联动实现
2014-07-26 21:14 574xml文件 <?xml version="1. ... -
json使用
2014-07-20 12:46 374后台 String json="[{'key' ... -
通过中文转码使用包装类
2014-07-13 22:48 544jsp <%@ page language=" ... -
struts1标签循环里面的判断
2014-07-07 10:21 539<%@ page language="java ... -
自定义标签库循环数组 list map输出
2014-07-07 08:24 947jsp <%@ page language=" ... -
自定义标签库读取list输出
2014-07-06 14:59 374jsp <%@ page language=" ... -
jsp标签循环数字到jsp页面
2014-07-06 13:53 541jsp <%@ page language=" ... -
自定义标签库读取文件
2014-07-06 11:38 401jsp <%@ page language=" ... -
jsp自动标签实现字母转换
2014-07-06 11:35 347jsp <%@ page language=" ... -
jsp自定义标签实现比较两个数值的大小
2014-07-06 11:33 858jsp <%@ page language=" ... -
jstl自定义标签库入门
2014-07-05 10:39 4501.先写java代码 package com.cgm.tldt ... -
jsp调用普通java类实例
2014-07-05 10:10 4411.jsp页面 <%@ page language= ... -
jstl c标签库的使用
2014-07-05 09:27 407<%@ page language="java ... -
文件多线程下载
2014-07-04 08:27 618//线程下载类 package com.c ... -
HttpURLConnection实现断点下载
2014-07-02 23:35 2141package cn.demo; import java.i ... -
java不依赖浏览器的(HttpUrlConnection)单线程不间断下载
2014-07-02 23:01 564package cn.demo; import java.io ... -
HttpUrlConnection模拟浏览器发送请求
2014-07-02 22:32 539servlet...code package cn.itc ... -
servle+jspt文件下载
2014-07-02 22:22 516jsp code <%@ page language=& ...
相关推荐
### JSP实现级联菜单详解 #### 一、概述 级联菜单是Web应用程序中常见的一种交互设计方式,尤其在需要展示多层级数据结构时,如省份-城市选择器等场景下非常实用。通过级联菜单,用户可以方便地根据上一级的选择来...
以上就是使用Struts2实现select级联选择的基本流程。不连接数据库的情况,数据可以直接在Action中初始化。在实际项目中,数据通常从数据库中获取,因此级联Action需要根据用户选择的省份查询数据库并返回相应城市的...
在JSP页面中实现select标签的级联效果,通常是为了解决具有层级关系的查询条件问题。级联下拉列表能够让用户在选择了某个特定选项之后,自动更新其他相关联的下拉列表的内容,从而实现数据的层次化筛选。 首先,要...
【JSP Ajax省市县Select级联菜单】是一个典型的前端与后端交互的示例,它在Web应用中常用于实现动态、无刷新的选择区域(省、市、县)功能。这个压缩包包含了一个完整的解决方案,使得用户在选择省份时,对应的市区...
根据提供的标题、描述以及部分代码内容,我们可以了解到这篇文章主要探讨的是如何在JSP(Java Server Pages)中实现级联选择框的效果。级联选择框通常用于处理多层级的数据结构,如国家-省份-城市这样的地理位置数据...
### JSP+JavaScript 实现二级级联下拉菜单的知识点解析 #### 一、概述 在Web开发领域,实现动态的交互式用户界面是提升用户体验的重要手段之一。本文档将详细解析如何通过JSP(JavaServer Pages)与JavaScript来...
在本文中,我们将深入探讨如何在JSP(JavaServer Pages)中实现一个基于JavaScript的出生日期三级级联下拉列表。这种功能常用于用户注册、个人信息填写等场景,让用户能够方便地选择他们的出生年、月和日。 首先,...
在IT行业中,"省市县三级级联select"是一种常见的前端交互设计,主要应用于地理信息的选择,比如用户在填写地址时需要依次选择省、市、县(区)。这种设计能够简化用户操作,提高用户体验,同时也方便后台处理数据。...
级联菜单的数据源通常来自数据库的某个表或者多个关联表,表中的字段代表菜单的层级和选项,通过查询语句(如SQL的SELECT语句)从数据库中检索出数据,然后由JSP将这些数据转换成菜单结构。 在压缩包中的两个文件...
本文将详细介绍如何使用JSP(JavaServer Pages)技术来实现这样的功能,并实时从数据库中获取数据。 首先,我们需要理解JSP的基本原理。JSP是一种动态网页技术,它允许我们将Java代码嵌入到HTML或XML文档中,以处理...
首先,我们看jsp页面中的代码: ```html <script src="dwr/interface/JUserChec.js"></script> <script src="dwr/engine.js"></script> <script src="dwr/util.js"></script> ``` 这里引入了DWR的核心文件,包括...
在本文中,我们将深入探讨如何使用JSP、JSON和MySQL来实现一个二级级联下拉菜单。这个功能常用于网站的表单设计中,让用户能够从相关联的分类中选择选项,例如省份与城市的选择。 首先,让我们了解这三个技术的核心...
在这个“jQuery+ajax实现三级级联”的实例中,我们主要探讨如何利用这两种技术来创建一个能够逐级联动的下拉菜单系统,这在数据筛选和表单填写中十分常见,如地区选择、部门分类等场景。 首先,jQuery是一个轻量级...
### JSP+AJAX三级级联及更多级的实现 #### 概述 在Web开发中,级联选择框是一种常见的交互方式,尤其在需要多级数据关联展示时(如省份-城市-区县的选择)。本文将详细介绍如何利用Java Server Pages (JSP) 和 ...
### jsp+ajax实现三级级联 在现代Web开发中,动态加载数据并根据用户的选择进行更新是非常常见的需求。例如,在电商网站上选择省份、城市和区县时,后两个选项会根据前一个选项的选择而变化。这种效果可以通过多种...
5. **JSP页面**:创建JSP页面,使用Struts2的<s:select>标签来创建级联的下拉框。通过设置`list`属性,`listKey`和`listValue`来绑定Action返回的数据。利用JavaScript或jQuery监听第一个下拉框的`onChange`事件,当...
### 使用jQuery、Ajax、JSP与Servlet实现二级级联菜单 #### 一、项目背景与技术栈概述 本文档将详细介绍如何使用jQuery、Ajax、JSP与Servlet来实现一个简单的二级级联菜单功能。该功能常见于许多Web应用程序中,如...
"ajax,jsp,servlet无刷新实现级联效果"是一个常见的应用场景,主要涉及的技术包括Ajax(异步JavaScript和XML)、Java Servlet以及JSP(JavaServer Pages)。在这个场景中,我们将探讨如何通过这些技术实现在网页上...
在级联菜单的设计中,至少会使用两个select元素,分别记为select1和select2。select1是第一个下拉列表,用户的选择会触发与之关联的JavaScript函数,这个函数根据用户在select1中的选择动态更新***2的内容。 接下来...