日期:2014-05-18  浏览次数:20613 次

二级联动下拉列表 问题???急求助 谢谢大家了!
<%@ page language="java" contentType="text/html;charset=GBK"%> 
<%@ include file="/include/header.inc"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>无标题文档 </title> 
<script language="javascript"> 
  //定义一个二维数组aArray,用于存放城市名称。  
  var aCity=new Array();  
  aCity[0]=new Array();  
  aCity[1]=new Array();  
  aCity[2]=new Array();  
  aCity[3]=new Array();  
  //赋值,每个省份的城市存放于数组的一行。  
  aCity[0][0]="--请选择--"  
  aCity[1][0]="--请选择--"  
  aCity[1][1]="商场(市场)";  
  aCity[1][2]="宾馆";  
  aCity[1][3]="珠海市";  
  aCity[1][4]="汕头市";  
  aCity[1][5]="佛山市";  
  aCity[2][0]="--请选择--"  
  aCity[2][1]="长沙市";  
  aCity[2][2]="株州市";  
  aCity[2][3]="湘潭市";  
  aCity[3][0]="--请选择--"  
  aCity[3][1]="杭州市";  
  aCity[3][2]="苏州市";  
  aCity[3][3]="温州市";  
  function ChangeCity()  
  {var i,iProvinceIndex;  
  iProvinceIndex=document.form1.optProvince.selectedIndex  
  iCityCount=0;  
  while (aCity[iProvinceIndex][iCityCount]!=null) iCityCount++;//计算选定省份的城市个数  
  document.form1.syxz.length=iCityCount;//改变下拉菜单的选项数  
  for (i=0;i <=iCityCount-1;i++)//改变下拉菜单的内容  
  document.form1.syxz[i]=new Option(aCity[iProvinceIndex][i]);  
  document.form1.syxz.focus()  
  }  
  
</script> 
</head> 

<body> 
<form id="form1" name="form1" method="post" action="xfjd!save.action"> 
<input type="hidden" name="xfjd.xfjd_id" value=" <ww:property value="xfjd.xfjd_id"/>"/> 
  <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#009966"> 
<td> <div align="center">使用性质 </div> </td> 
  <td colspan="2" width="90%"> 
  <ww:if test="xfjd.xfjd_id == null">  
  <SELECT NAME="optProvince" SIZE="1" ONCHANGE=ChangeCity()>  
  <OPTION value="%">--请选择-- </OPTION>  
  <OPTION>广东省 </OPTION>  
  <OPTION>湖南省 </OPTION>  
  <OPTION>浙江省 </OPTION>  
  </SELECT> 
  <SELECT name="syxz" SIZE="1"> 这块怎么传 正常是 name=xfjd.syxz 但是JS 里这么写就不行了!  
  <OPTION >--请选择-- </OPTION>  
  </SELECT> 
  </ww:if> 
  <ww:else> 
  <input type"text" name=&qu