具体数据形式自己安排
<form name=form1>
<select name="select1" OnChange="showList();">
<option value=""> </option>
<option value="0">1111</option>
<option value="1">2222</option>
</select>
<DIV ID=iHTML></DIV>
</form>
<script>
var data1 = [[1,2,3],[4,5,6,7]];
var data2 = [["1111-1","1111-2","1111-3"],["2222-1","2222-2","2222-3","2222-4"]];
function getList(iValue){
if(!form1.select1.options[form1.select1.selectedIndex].value)
return "";
var iStr = "";
for(var i=0;i<data1[iValue].length;i++)
iStr += "<option value=" + data1[iValue][i] + ">" + data2[iValue][i] + "</option>";
return "<select name=select2>" + iStr + "</select>";
}
function showList(){
iHTML.innerHTML = getList(form1.select1.options[form1.select1.selectedIndex].value);
}
</script>
[此贴子已经被作者于2006-8-14 1:17:41编辑过]