java省市级联
来源:互联网 发布:喀秋莎录屏软件官网 编辑:程序博客网 时间:2024/06/06 14:43
<%@ page language="java" import="java.util.*" pageEncoding="GBK" errorPage=""%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>省市级联</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
if('<%=request.getParameter("pid") %>'=='null')
{
window.location = "SelectCity2Servlet?province2=0";
}
function change(selectedId, targetId)
{
window.location = "SelectCity2Servlet?province2=" + selectedId;
}
</script>
</head>
<c:set var="pid" value="<%=request.getParameter("pid") %>"></c:set>
<body>
<br>
示例2:
<br>
<form name="form1" method="post" action="">${pid}
<select name="province2" onChange="change(this.value, 'city2');">
<c:if test="${pid!=null }">
<option value="请选择">-请选择-</option>
<c:forEach var="province" items="${provinceList }">
<option value="${province.pid } " <c:if test="${province.pid} == ${pid}">selected</c:if> >${province.pname }</option>
</c:forEach>
</c:if>
</select>
省
<select name="city2">
<option value="请选择">-请选择-</option>
<c:set var="cityList" value="${sessionScope.cityList}"></c:set>
<c:if test="${cityList!=null }">
<c:forEach var="city" items="${cityList }">
<option value="${city.id}">${city.cname }</option>
</c:forEach>
</c:if>
</select>
市
</form>
</body>
</html>
- java省市级联
- 省市级联
- 省市级联
- 省市级联
- 省市级联
- 省市级联
- 省市级联
- 省市级联
- Java图形界面编写的省市级联选项
- 级联菜单,省市级联菜单
- 国家省市级联菜单
- Tapestry省市级联
- 省市级联菜单javascript
- js的省市级联
- js省市级联
- JS控制省市级联
- 省市级联 求注释
- 全国省市级联
- Ubuntu 更改主机名显示路径的更改
- 网络营销的十五大形式(上)
- struts2与struts1.2的对比
- 解决MySQL远程访问不允许得个好用方案
- PostgreSQL数据库集群:pgpool-II工具
- java省市级联
- Oracle 10g 环境下安装 Pentaho
- Struts 官方网站有没有打包下载api的地方呀?
- Installing OpenGrok On Ubuntu Linux 【转】
- Jpg, Jpeg, Exif
- Elastix视频通话配置
- SSH 项目 hibernate 反向 映射 生 成 表
- IT Professional投稿意见反馈(翻译)
- 特殊符号的英文说法