修改后的JSP代码如下:
<%@ page language="java" contentType="text/html charset=UTF-8"pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html charset=UTF-8">
<link rel="stylesheet" type="text/css" href="CSS/css_style.css" />
<title>恒丰银行昆明分行外部评级机构管理系统</title>
</head>
<script>
var arr = new Array()
arr[0] = "昆明市,五华区,盘龙区,官渡区,西山区,东川区,呈贡县,晋宁县,富民县,宜良县,石林彝族自治县,嵩明县,禄劝彝族苗族自治县,寻甸回族彝族自治县,安宁市"
arr[1] = "曲靖市,麒麟区,马龙县,陆良县,师宗县,罗平县,富源县,会泽县,沾益县,宣威市"
arr[2] = "玉溪市,红塔区,江川县,澄江县,通海县,华宁县,易门县,峨山彝族自治县,新平彝族傣族自治县,元江哈尼族彝族傣族自治县"
arr[3] = "昭通市,昭阳区,鲁甸县,巧家县,盐津县,大关县,永善县,绥江县,镇雄县,彝良县,威信县,水富县"
arr[4] = "丽江市,隆阳区,施甸县,腾冲县,龙陵县,昌宁县"
arr[5] = "普洱市,古城区,玉龙纳西族自治县,永胜县,华坪县,宁蒗彝族自治县"
arr[6] = "临沧市,翠云区,普洱哈尼族彝族自治县,墨江哈尼族自治县,景东彝族自治县,景谷傣族彝族自治县,镇沅彝族哈尼族拉祜族自治县,江城哈尼族彝族自治县,孟连傣族拉祜族佤族自治县,澜沧拉祜族自治县,西盟佤族自治县"
arr[7] = "德宏市,临翔区,凤庆县,云县,永德县,镇康县,双江拉祜族佤族布朗族傣族自治县,耿马傣族佤族自治县,沧源佤族自治县"
arr[8] = "瑞丽市,潞西市,梁河县,盈江县,陇川县"
arr[9] = "泸水县,福贡县,贡山独龙族怒族自治县,兰坪白族普米族自治县"
arr[10] = "香格里拉县,德钦县,维西傈僳族自治县"
arr[11] = "大理市,漾濞彝族自治县,祥云县,宾川县,弥渡县,南涧彝族自治县,巍山彝族回族自治县,永平县,云龙县,洱源县,剑川县,鹤庆县"
arr[12] = "楚雄市,双柏县,牟定县,南华县,姚安县,大姚县,永仁县,元谋县,武定县,禄丰县"
arr[13] = "个旧市,开远市,蒙自县,屏边苗族自治县,建水县,石屏县,弥勒县,泸西县,元阳县,红河县,金平苗族瑶族傣族自治县,绿春县,河口瑶族自治县"
arr[14] = "文山县,砚山县,西畴县,麻栗坡县,马关县,丘北县,广南县,富宁县"
arr[15] = "景洪市,勐海县,勐腊县"
function init(index) {
var city = document.getElementById("city_" + index)
var cityArr = arr[0].split(",")
for (var i = 0 i < cityArr.length i++) {
city[i] = new Option(cityArr[i], cityArr[i])
}
}
function getCity(comp) {
//获得控件序号(1..*)
var index = comp.id.charAt(comp.id.length - 1)
var province = document.getElementById("province_" + index)
var city = document.getElementById("city_" + index)
var cityArr = arr[province.selectedIndex].split(",")
city.length = 0
//将城市数组中的值填充到城市下拉框中
for (var i = 0 i < cityArr.length i++) {
city[i] = new Option(cityArr[i], cityArr[i])
}
}
</script>
<script>
function displayResult(){
var table=document.getElementById("table-7")
var rows = table.rows.length
var currRow = rows - 1
var row = table.insertRow(currRow)
var cell1=row.insertCell(0)
var cell2=row.insertCell(1)
var index = currRow - 2
cell1.innerHTML="+抵押物"
cell2.innerHTML="抵押物证号:<input name='clot_no_" + index + "'><input type='button' value='+' onClick='displayResult()'><br/>"
+"抵押物归属地:"
+"<select id='province_" + index + "' size=1 onchange='getCity(this)'>"
+"<option value=0>昆明</option>"
+"<option value=1>曲靖</option>"
+"<option value=2>玉溪</option>"
+"<option value=3>昭通</option>"
+"<option value=4>保山</option>"
+"<option value=5>丽江</option>"
+"<option value=6>普洱</option>"
+"<option value=7>临沧</option>"
+"<option value=8>德宏</option>"
+"<option value=9>怒江</option>"
+"<option value=10>迪庆</option>"
+"<option value=11>大理</option>"
+"<option value=12>楚雄</option>"
+"<option value=13>红河</option>"
+"<option value=14>文山</option>"
+"<option value=15>版纳</option>"
+"</select>"
+"<select id='city_" + index + "' style='width: auto'></select><br/>"
+"抵押物地址:<input name='clotaddr" + index + "'>"
init(index)
}
</script>
<body onload="init(1)">
<div id="wrapper">
<header class="SiteHeader"> <img src="PIC/HF_LOGO.png"
alt="HFKM-KJB" style="width: 89px height: 34px"> </header>
<aside class="NavSidebar"> <nav>
<h2>当前用户</h2>
<ul>
<li>用户名:</li>
<li>角色:</li>
</ul>
</nav> <nav>
<h2>功能导航</h2>
<ul>
<%
String mana_type=session.getAttribute("mana_type").toString()
String menu=""
if (mana_type.equals("系统管理员")) {
menu="<li><a href=\"showOrg.do\">查看评估机构</a></li><li><a href=\"CreateOrg.jsp\">新增评估机构</a></li><li><a href=\"showPle_done.do\">查看已抽签抵押物</a></li><li><a href=\"showPle.do\">查看未抽签抵押物</a></li><li><a href=\"showPle.do\">抽签结果查看</a></li>"
} else
{
menu="<li><a href=\"showOrg.do\">查看评估机构</a></li><li><a href=\"showPle_done.do\">查看已抽签抵押物</a></li><li><a href=\"showPle.do\">查看未抽签抵押物</a></li><li><a href=\"CreatePle.jsp\">新增抵押物</a></li><li><a href=\"showPle.do\">抵押物抽签</a></li>"
}
%>
<%=menu%>
</ul>
</nav> <section>
<h2>系统设置</h2>
<ul>
<li><a href="">修改密码</a></li>
<li><a href="logout.do">退出登录</a></li>
</ul>
</section> <br />
<br />
<br />
<br />
</aside>
<main> <article class="Content"> <header
class="ArticleHeader"> </header>
<h3 align=center>新增业务信息</h3>
<br />
<form name="frmCrePle" action="CrePle.do">
<table border="1" id="table-7">
<tr>
<td>借款人名称</td>
<td><input name="loan_na"></td>
</tr>
<tr>
<td>借款人身份证号/统一社会信用代码</td>
<td><input name="loan_no"></td>
</tr>
<tr>
<td>抵押人名称</td>
<td><input name="plg_na"></td>
</tr>
<tr>
<td id="td_na_1">抵押物</td>
<td id="clot_no">
抵押物证号:<input name="clot_no_1"><input type="button" value="+" onClick="displayResult(this)"><br/>
抵押物归属地:
<select id="province_1" size=1 onchange="getCity(this)">
<option value=0>昆明</option>
<option value=1>曲靖</option>
<option value=2>玉溪</option>
<option value=3>昭通</option>
<option value=4>保山</option>
<option value=5>丽江</option>
<option value=6>普洱</option>
<option value=7>临沧</option>
<option value=8>德宏</option>
<option value=9>怒江</option>
<option value=10>迪庆</option>
<option value=11>大理</option>
<option value=12>楚雄</option>
<option value=13>红河</option>
<option value=14>文山</option>
<option value=15>版纳</option>
</select>
<select id="city_1" style="width: auto"></select><br/>
抵押物地址:<input name="clotaddr_1">
</td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" value="提交"></td>
</tr>
</table>
</form>
</article> </main>
<footer>
<p class="Disclaimer">
© 2017 恒丰银行昆明分行<br> Disign by KJB-TianSIR
</p>
</footer>
</div>
</body>
</html>
这种东西关键就是函数名和参数什么的最好别重名给你个长的,自己照着改改吧,就是那么个意思源代码复制到一个网页就可以
<SCRIPT LANGUAGE="JavaScript">
function Dyyfff()
{
this.Items = {}
}
Dyyfff.prototype.add = function(id,iArray)
{
this.Items[id] = iArray
}
Dyyfff.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false
return true
}
function changfffe(vfff){
var strfff="0"
for(ifff=0ifff<vfffifff++){ strfff+=("_"+(document.getElementById(sfff[ifff]).selectedIndex-1))}
var ssfff=document.getElementById(sfff[vfff])
with(ssfff){
length = 0
options[0]=new Option(opt0[vfff],opt0[vfff])
if(vfff &&document.getElementById(sfff[vfff-1]).selectedIndex>0 || !vfff)
{
if(Dyyfff.Exists(strfff)){
arfff = Dyyfff.Items[strfff]
for(ifff=0ifff<arfff.lengthifff++)options[length]=new Option(arfff[ifff],arfff[ifff])
if(vfff)options[1].selected = true
}
}
if(++vfff<sfff.length){changfffe(vfff)}
}
}
var Dyyfff = new Dyyfff()
Dyyfff.add("0",["计算机/互联网/通讯类","市场/公关/广告类","教师类","服务类","文字/艺术/设计类","高级管理类"," 销售类","行政/人事/后勤类","物流/贸易/采购类","建筑/房地产类","翻译类","生产/营运/工程类","财务/审计/统计/金融类","医疗/护理类","咨询/顾问类","律师/法务类" ])
Dyyfff.add("0_0",["首席技术执行官","技术总监经理","信息技术经理","信息技术主管","信息技术专员","项目经理主管","项目执行协调人员","系统分析员","高级软件工程师","软件工程师","系统工程师","高级硬件工程师","硬件工程师","通信技术工程师","ERP技术/应用顾问","数据库工程师","技术支持经理","技术支持工程师","品质经理","信息安全工程师","软件测试工程师","硬件测试工程师","测试员","网站营运经理/主管","网络工程师","系统管理员/网管","网页设计/制作","Web开发工程师","网页设计美工","平面设计美工","三维动画设计工程师","技术文员/助理"])
Dyyfff.add("0_1",["市场/广告总监","市场/营销经理","市场/营销主管","市场/营销专员","市场助理","产品/品牌经理","产品/品牌主管","市场通路经理","市场通路主管","促销经理","促销主管","促销员","市场分析/调研人员","公关/会务经理","公关/会务主管 ","公关/会务专员","媒介经理","媒介人员","企业/业务发展经理","企业策划人员","广告策划/设计/文案"])
Dyyfff.add("0_2",["教师","教学/教务管理人员","助教","讲师","家教"])
Dyyfff.add("0_3",["美容/健身顾问","餐饮/娱乐经理","宾馆/酒店经理","领班","服务员","营业员/收银员/理货员","厨师","导游","司机","保安","寻呼员/话务员"])
Dyyfff.add("0_4",["编辑/作家/撰稿人","记者","校对/录入","排版设计","艺术/设计总监","影视策划/制作人员","导演","摄影师","音效师","演员/模特/主持人","平面设计/美术设计","纺织/服装设计","工业/产品设计","工艺品/珠宝设计"])
Dyyfff.add("0_5",["首席执行官/总经理","副总经理","总监","合伙人","总裁/总经理助理"])
Dyyfff.add("0_6",["销售总监","销售经理","区域销售经理","客户经理","渠道/分销经理","渠道主管","销售主管","销售代表","销售工程师","医药代表","保险代理","销售助理","商务经理","商务专员/助理","销售行政经理","销售行政主管","售前/售后技术服务经理","售前/售后技术服务主管","售前/售后技术服务工程师","售后/客户服务(非技术)经理","售后/客户服务(非技术)主管","售后/客户服务(非技术)专员","经销商"])
Dyyfff.add("0_7",["行政/人事总监","人事经理","人事主管","人事专员","人事助理","招聘经理/主管","薪资福利经理/主管","薪资福利专员/助理","培训经理/主管","培训专员/助理","行政经理/主管/办公室主任","行政专员/助理","经理助理/秘书","前台接待/总机","后勤","资料管理员","电脑操作员/打字员"])
Dyyfff.add("0_8",["物流经理","物流主管","物流专员/助理","物料经理","物料主管","采购经理","采购主管","采购员","外贸/贸易经理/主管","外贸/贸易专员/助理","业务跟单经理","高级业务跟单", "业务跟单","助理业务跟单","仓库经理/主管","仓库管理员","运输经理/主管","报关员","单证员","船务人员","快递员","理货员"])
Dyyfff.add("0_9",["建筑工程师","结构/土建工程师","电气工程师","给排水/暖通工程师","工程造价师/预结算","建筑工程管理","工程监理","室内外装潢设计","城市规划与设计","建筑制图","施工员", "房地产开发/策划","房地产评估","房地产中介/交易","物业管理"])
Dyyfff.add("0_10",["英语翻译","日语翻译","德语翻译","法语翻译","俄语翻译","西班牙语翻译","朝鲜语翻译","其他语种翻译"])
Dyyfff.add("0_11",["工厂经理/厂长","总工程师/副总工程师","项目经理/主管","项目工程师","营运经理","营运主管","生产经理/车间主任","生产计划协调员","生产主管/督导/领班","技术/工艺设计经理/主管","技术/工艺设计工程师","实验室负责人/工程师","工程/设备经理","工程/设备主管","工程/设备工程师","电气/电子工程师","机械工程师","机电工程师","维修工程师","质量经理","质量主管","质量工程师","质量检验员/测试员","认证工程师","安全/健康/环境经理/主管","安全/健康/环境工程师","工程绘图员","机械制图员","化验员","技工","电工","服装打样/制版"])
Dyyfff.add("0_12",["财务总监","财务经理","财务主管/总帐主管 ","会计经理/会计主管","会计","出纳员","财务/会计助理","财务分析经理/主管 ","财务分析员","成本经理/成本主管","成本管理员","审计经理/主管","审计专员/助理","税务经理/税务主管","税务专员","证券经纪人","投资顾问","注册分析师","投资/基金项目经理","融资经理/融资主管","融资专员","行长/副行长","风险控制","进出口/信用证结算","清算人员","外汇主管","高级客户经理/客户经理","客户主管/专员","信贷/信用调查/分析人员","银行柜台出纳","统计员"])
Dyyfff.add("0_13",[
"医生(中\西医","医学管理人员","医药技术人员","药库主任/药剂师 ","护士/护理人员","临床协调员","临床研究员","麻醉师","心理医生","医药学检验"])
Dyyfff.add("0_14",["专业顾问","咨询总监","咨询经理","咨询员"])
Dyyfff.add("0_15",["律师","法务人员","律师助理","书记员"])
//-->
</SCRIPT>
<SCRIPT LANGUAGE = JavaScript>
var sfff=["sfff1","sfff2"]
var opt0 = ["职位类别不限","不限"]
function setupfff()
{
for(ifff=0ifff<sfff.length-1ifff++)
document.getElementById(sfff[ifff]).onchange=new Function("changfffe("+(ifff+1)+")")
changfffe(0)
}
//##联动菜单结束-->
</SCRIPT>
<!--又是可恶的二级联动-->
<!---------------------------------------->
<SCRIPT LANGUAGE="JavaScript">
<!-- ###中国省市二级联动菜单开始##如有问题请到http://hi.baidu.com/51site找我!##
function Dyyeee()
{
this.Items = {}
}
Dyyeee.prototype.add = function(id,iArray)
{
this.Items[id] = iArray
}
Dyyeee.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false
return true
}
function changeeee(veee){
var streee="0"
for(ieee=0ieee<veeeieee++){ streee+=("_"+(document.getElementById(seee[ieee]).selectedIndex-1))}
var sseee=document.getElementById(seee[veee])
with(sseee){
length = 0
options[0]=new Option(opt0[veee],opt0[veee])
if(veee &&document.getElementById(seee[veee-1]).selectedIndex>0 || !veee)
{
if(Dyyeee.Exists(streee)){
areee = Dyyeee.Items[streee]
for(ieee=0ieee<areee.lengthieee++)options[length]=new Option(areee[ieee],areee[ieee])
if(veee)options[1].selected = true
}
}
if(++veee<seee.length){changeeee(veee)}
}
}
var Dyyeee = new Dyyeee()
Dyyeee.add("0",["北京市","天津市","河北省","山西省","内蒙古","辽宁省","吉林省","黑龙江省","上海市","江苏省","浙江省","安徽省","福建省","江西省","山东省","河南省","湖北省","湖南省","广东省","广西自治区","海南省","重庆市","四川省","贵州省","云南省","西藏自治区","陕西省","甘肃省","青海省","宁夏回族自治区","新疆维吾尔自治区","香港特别行政区","澳门特别行政区","台湾省","其它"])
Dyyeee.add("0_0",["东城区","西城区","崇文区","宣武区","朝阳区","丰台区","石景山区"," 海淀区(中关村)","门头沟区","房山区","通州区","顺义区","昌平区","大兴区","怀柔区","平谷区","密云县","延庆县","其他"])
Dyyeee.add("0_1",["河东区","河西区","南开区","红桥区","塘沽区","汉沽区","大港区","西青区","津南区","武清区","蓟县","宁河县","静海县","其他"])
Dyyeee.add("0_2",["张家口市","承德市","秦皇岛市","唐山市","廊坊市","衡水市","沧州市","邢台市","邯郸市","保定市","其他"])
Dyyeee.add("0_3",["太原市","朔州市","大同市","长治市","晋城市","忻州市","晋中市","临汾市","吕梁市","运城市","其他"])
Dyyeee.add("0_4",["呼和浩特市","包头市","赤峰市","呼伦贝尔市","鄂尔多斯市","乌兰察布市","巴彦淖尔市","兴安盟","阿拉善盟","锡林郭勒盟","其他"])
Dyyeee.add("0_5",["沈阳市","朝阳市","阜新市","铁岭市","抚顺市","丹东市","本溪市","辽阳市","鞍山市","大连市","营口市","盘锦市","锦州市","葫芦岛市","其他"])
Dyyeee.add("0_6",["长春市","白城市","吉林市","四平市","辽源市","通化市","白山市","延边朝鲜族自治州","其他"])
Dyyeee.add("0_7",["哈尔滨市","七台河市","黑河市","大庆市","齐齐哈尔市","伊春市","佳木斯市","双鸭山市","鸡西市","大兴安岭地区(加格达奇)","牡丹江","鹤岗市","绥化市 ","其他"])
Dyyeee.add("0_8",["黄浦区","卢湾区","徐汇区","长宁区","静安区","普陀区","闸北区","虹口区","杨浦区","闵行区","宝山区","嘉定区","浦东新区","金山区","松江区","青浦区","南汇区","奉贤区","崇明县","其他"])
Dyyeee.add("0_9",["南京市","徐州市","连云港市","宿迁市","淮安市","盐城市","扬州市","泰州市","南通市","镇江市","常州市","无锡市","苏州市","其他"])
Dyyeee.add("0_10",["杭州市","湖州市","嘉兴市","舟山市","宁波市","绍兴市","衢州市","金华市","台州市","温州市","丽水市","其他"])
Dyyeee.add("0_11",["合肥市","宿州市","淮北市","亳州市","阜阳市","蚌埠市","淮南市","滁州市","马鞍山市","芜湖市","铜陵市","安庆市","黄山市","六安市","巢湖市","池州市","宣城市","其他"])
Dyyeee.add("0_12",["福州市","南平市","莆田市","三明市","泉州市","厦门市","漳州市","龙岩市","宁德市","其他"])
Dyyeee.add("0_13",["南昌市","九江市","景德镇市","鹰潭市","新余市","萍乡市","赣州市","上饶市","抚州市","宜春市","吉安市","其他"])
Dyyeee.add("0_14",["济南市","聊城市","德州市","东营市","淄博市","潍坊市","烟台市","威海市","青岛市","日照市","临沂市","枣庄市","济宁市","泰安市","莱芜市","滨州市","菏泽市","其他"])
Dyyeee.add("0_15",["郑州市","三门峡市","洛阳市","焦作市","新乡市","鹤壁市","安阳市","濮阳市","开封市","商丘市","许昌市","漯河市","平顶山市","南阳市","信阳市","周口市","驻马店市","其他"])
Dyyeee.add("0_16",["武汉市","十堰市","襄樊市","荆门市","孝感市","黄冈市","鄂州市","黄石市","咸宁市","荆州市","宜昌市","随州市","恩施土家族苗族自治州","仙桃市","天门市","潜江市","神农架林区","其他"])
Dyyeee.add("0_17",["长沙市","张家界市","常德市","益阳市","岳阳市","株洲市","湘潭市","衡阳市","郴州市","永州市","邵阳市","怀化市","娄底市","湘西土家族苗族自治州","其他"])
Dyyeee.add("0_18",["广州市","清远市市","韶关市","河源市","梅州市","潮州市","汕头市","揭阳市","汕尾市","惠州市","东莞市","深圳市","珠海市","中山市","江门市","佛山市","肇庆市","云浮市","阳江市","茂名市","湛江市","其他"])
Dyyeee.add("0_19",["南宁市","桂林市","柳州市","梧州市","贵港市","玉林市","钦州市","北海市","防城港市","崇左市","百色市","河池市","来宾市","贺州市","其他"])
Dyyeee.add("0_20",["海口市","三亚市","其他"])
Dyyeee.add("0_21",["渝中区","大渡口区","江北区","沙坪坝区","九龙坡区","南岸区","北碚区","万盛区","双桥区","渝北区","巴南区","万州区","涪陵区","黔江区","长寿区","合川市","永川市","江津市","南川市","綦江县","潼南县","铜梁县","大足县","璧山县","垫江县","武隆县","丰都县","城口县","开县","巫溪县","巫山县","奉节县","云阳县","忠县","石柱土家族自治县","彭水苗族土家族自治县","酉阳土家族苗族自治县","秀山土家族苗族自治县","其他"])
Dyyeee.add("0_22",["成都市","广元市","绵阳市","德阳市","南充市","广安市","遂宁市","内江市","乐山市","自贡市","泸州市","宜宾市","攀枝花市","巴中市","资阳市","眉山市","雅安","阿坝藏族羌族自治州","甘孜藏族自治州","凉山彝族自治州县","其他"])
Dyyeee.add("0_23",["贵阳市","六盘水市","遵义市","安顺市","毕节地区","铜仁地区","黔东南苗族侗族自治州","黔南布依族苗族自治州","黔西南布依族苗族自治州","其他"])
Dyyeee.add("0_24",["昆明市","曲靖市","玉溪市","保山市","昭通市","丽江市","普洱市","临沧市","宁德市","德宏傣族景颇族自治州","怒江僳僳族自治州","楚雄彝族自治州","红河哈尼族彝族自治州","文山壮族苗族自治州","大理白族自治州","迪庆藏族自治州","西双版纳傣族自治州","其他"])
Dyyeee.add("0_25",["拉萨市","那曲地区","昌都地区","林芝地区","山南地区","日喀则地区","阿里地区","其他"])
Dyyeee.add("0_26",["西安市","延安市","铜川市","渭南市","咸阳市","宝鸡市","汉中市","安康市","商洛市","其他"])
Dyyeee.add("0_27",["兰州市 ","嘉峪关市","金昌市","白银市","天水市","武威市","酒泉市","张掖市","庆阳市","平凉市","定西市","陇南市","临夏回族自治州","甘南藏族自治州","其他"])
Dyyeee.add("0_28",["西宁市","海东地区","海北藏族自治州","黄南藏族自治州","玉树藏族自治州","海南藏族自治州","果洛藏族自治州","海西蒙古族藏族自治州","其他"])
Dyyeee.add("0_29",["银川市","石嘴山市","吴忠市","固原市","中卫市","其他"])
Dyyeee.add("0_30",["乌鲁木齐市","克拉玛依市","喀什地区","阿克苏地区","和田地区","吐鲁番地区","哈密地区","塔城地区","阿勒泰地区","克孜勒苏柯尔克孜自治州","博尔塔拉蒙古自治州","昌吉回族自治州 伊犁哈萨克自治州","巴音郭楞蒙古自治州","河子市","阿拉尔市","五家渠市","图木舒克市","其他"])
Dyyeee.add("0_31",["香港","其他"])
Dyyeee.add("0_31",["澳门","其他"])
Dyyeee.add("0_32",["台湾","其他"])
//-->
</SCRIPT>
<SCRIPT LANGUAGE = JavaScript>
var seee=["seee1","seee2"]
var opt0 = ["工作省份不限","工作城市不限"]
function setupeee()
{
for(ieee=0ieee<seee.length-1ieee++)
document.getElementById(seee[ieee]).onchange=new Function("changeeee("+(ieee+1)+")")
changeeee(0)
}
//##联动菜单结束-->
</SCRIPT>
<select name="" style="width:180px" id="sfff1"></select>
<select name="ss_find_post" style="width:180px" id="sfff2"></select>
<SCRIPT language="javascript">
setupfff()
</SCRIPT>
<select name="ss_seee1" style="width:180px" id="seee1"></select>
<select name="ss_sub_seee1" style="width:180px" id="seee2"> </select>
<SCRIPT language="javascript">
setupeee()
</SCRIPT>
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%><%
String path = request.getContextPath()
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<head>
<title>省市县关联菜单</title>
<meta http-equiv="Content-Type" content="text/HTMLcharset=gb2312">
<style>
body,select
{
font-size:9pt
font-family:Verdana
}
a
{
color:red
text-decoration:none
}
a:hover{
text-decoration:underline
}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Dsy()
{
this.Items = {}
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false
return true
}
function change(v){
var str="0"
for(i=0i<vi++){ str+=("_"+(document.getElementById(s[i]).selectedIndex-1))}
var ss=document.getElementById(s[v])
with(ss){
length = 0
options[0]=new Option(opt0[v],opt0[v])
if(v &&document.getElementById(s[v-1]).selectedIndex>0 || !v)
{
if(dsy.Exists(str)){
ar = dsy.Items[str]
for(i=0i<ar.lengthi++)options[length]=new Option(ar[i],ar[i])
if(v)options[1].selected = true
}
}
if(++v<s.length){change(v)}
}
}
var dsy = new Dsy()
dsy.add("0",["安徽","北京","福建","甘肃","广东","广西","贵州","海南","河北","河南","黑龙江","湖北","湖南","吉林","江苏","江西","辽宁","内蒙古","宁夏","青海","山东","山西","陕西","上海","四川","天津","西藏","新疆","云南","浙江","重庆"])
dsy.add("0_0",["安庆","蚌埠","巢湖","池州","滁州","阜阳","合肥","淮北","淮南","黄山","六安","马鞍山","宿州","铜陵","芜湖","宣城","亳州"])
dsy.add("0_1",["北京"])
dsy.add("0_2",["福州","龙岩","南平","宁德","莆田","泉州","三明","厦门","漳州"])
dsy.add("0_3",["白银","定西","甘南藏族自治州","嘉峪关","金昌","酒泉","兰州","临夏回族自治州","陇南","平凉","庆阳","天水","武威","张掖"])
dsy.add("0_4",["潮州","东莞","佛山","广州","河源","惠州","江门","揭阳","茂名","梅州","清远","汕头","汕尾","韶关","深圳","阳江","云浮","湛江","肇庆","中山","珠海"])
dsy.add("0_5",["百色","北海","崇左","防城港","桂林","贵港","河池","贺州","来宾","柳州","南宁","钦州","梧州","玉林"])
dsy.add("0_6",["安顺","毕节","贵阳","六盘水","黔东南苗族侗族自治州","黔南布依族苗族自治州","黔西南布依族苗族自治州","铜仁","遵义"])
dsy.add("0_7",["白沙黎族自治县","保亭黎族苗族自治县","昌江黎族自治县","澄迈县","定安县","东方","海口","乐东黎族自治县","临高县","陵水黎族自治县","琼海","琼中黎族苗族自治县","三亚","屯昌县","万宁","文昌","五指山","儋州"])
dsy.add("0_8",["保定","沧州","承德","邯郸","衡水","廊坊","秦皇岛","石家庄","唐山","邢台","张家口"])
dsy.add("0_9",["安阳","鹤壁","济源","焦作","开封","洛阳","南阳","平顶山","三门峡","商丘","新乡","信阳","许昌","郑州","周口","驻马店","漯河","濮阳"])
dsy.add("0_10",["大庆","大兴安岭","哈尔滨","鹤岗","黑河","鸡西","佳木斯","牡丹江","七台河","齐齐哈尔","双鸭山","绥化","伊春"])
dsy.add("0_11",["鄂州","恩施土家族苗族自治州","黄冈","黄石","荆门","荆州","潜江","神农架林区","十堰","随州","天门","武汉","仙桃","咸宁","襄樊","孝感","宜昌"])
dsy.add("0_12",["常德","长沙","郴州","衡阳","怀化","娄底","邵阳","湘潭","湘西土家族苗族自治州","益阳","永州","岳阳","张家界","株洲"])
dsy.add("0_13",["白城","白山","长春","吉林","辽源","四平","松原","通化","延边朝鲜族自治州"])
dsy.add("0_14",["常州","淮安","连云港","南京","南通","苏州","宿迁","泰州","无锡","徐州","盐城","扬州","镇江"])
dsy.add("0_15",["抚州","赣州","吉安","景德镇","九江","南昌","萍乡","上饶","新余","宜春","鹰潭"])
dsy.add("0_16",["鞍山","本溪","朝阳","大连","丹东","抚顺","阜新","葫芦岛","锦州","辽阳","盘锦","沈阳","铁岭","营口"])
dsy.add("0_17",["阿拉善盟","巴彦淖尔盟","包头","赤峰","鄂尔多斯","呼和浩特","呼伦贝尔","通辽","乌海","乌兰察布盟","锡林郭勒盟","兴安盟"])
dsy.add("0_18",["固原","石嘴山","吴忠","银川"])
dsy.add("0_19",["果洛藏族自治州","海北藏族自治州","海东","海南藏族自治州","海西蒙古族藏族自治州","黄南藏族自治州","西宁","玉树藏族自治州"])
dsy.add("0_20",["滨州","德州","东营","菏泽","济南","济宁","莱芜","聊城","临沂","青岛","日照","泰安","威海","潍坊","烟台","枣庄","淄博"])
dsy.add("0_21",["长治","大同","晋城","晋中","临汾","吕梁","朔州","太原","忻州","阳泉","运城"])
dsy.add("0_22",["安康","宝鸡","汉中","商洛","铜川","渭南","西安","咸阳","延安","榆林"])
dsy.add("0_23",["上海"])
dsy.add("0_24",["阿坝藏族羌族自治州","巴中","成都","达州","德阳","甘孜藏族自治州","广安","广元","乐山","凉山彝族自治州","眉山","绵阳","南充","内江","攀枝花","遂宁","雅安","宜宾","资阳","自贡","泸州"])
dsy.add("0_25",["天津"])
dsy.add("0_26",["阿里","昌都","拉萨","林芝","那曲","日喀则","山南"])
dsy.add("0_27",["阿克苏","阿拉尔","巴音郭楞蒙古自治州","博尔塔拉蒙古自治州","昌吉回族自治州","哈密","和田","喀什","克拉玛依","克孜勒苏柯尔克孜自治州","石河子","图木舒克","吐鲁番","乌鲁木齐","五家渠","伊犁哈萨克自治州"])
dsy.add("0_28",["保山","楚雄彝族自治州","大理白族自治州","德宏傣族景颇族自治州","迪庆藏族自治州","红河哈尼族彝族自治州","昆明","丽江","临沧","怒江僳僳族自治州","曲靖","思茅","文山壮族苗族自治州","西双版纳傣族自治州","玉溪","昭通"])
dsy.add("0_29",["杭州","湖州","嘉兴","金华","丽水","宁波","绍兴","台州","温州","舟山","衢州"])
dsy.add("0_30",["重庆"])
//-->
</SCRIPT>
<SCRIPT LANGUAGE = JavaScript>
<!--
//** Power by Fason(2004-3-11)
//** Email:fason_pfx@hotmail.com
var s=["s1","s2"]
var opt0 = ["省份","地级市"]
function setup()
{
for(i=0i<s.length-1i++)
document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")")
change(0)
}
//-->
</SCRIPT>
</head>
<body bgcolor="#E0E0E0" onload="setup()">
多级关联菜单:
<form name="frm">
<select id="s1"><option>省份</option></select>
<select id="s2"><option>地级市</option></select>
</form>
</body>
</HTML>
这个我测过了,可以实现