花了一段时间搞出来的:
<script language="javascript">
 
 var kindList=new Array()
 <%int m=0;
 for(int j=0;j<list.size();j++){
  NetsdSmallKind smallKind=(NetsdSmallKind)list.get(j);
 %>
 kindList[<%=m++%>]=new Array("<%=smallKind.getId()%>","<%=smallKind.getKindid()%>","<%=smallKind.getSkindname()%>");
  
 <%}%>
 function ChangeKind(locationid){
  var i
  document.form1.smallkindid.length=0
   var locationid=locationid
   for(i=0;i<<%=m%>;i++){
  if( kindList[i][1]==locationid){
   document.form1.smallkindid.options[document.form1.smallkindid.length]=new Option(kindList[i][2],kindList[i][0])
   }
   }
  document.form1.smallkindid.focus();
 }
</script>