<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>下拉二级关联</title>
</head>
<body>
<form name="doublecombo">
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option>江苏</option>
<option>安徽</option>
<option>贵州</option>
</select>
<select name="stage2" size="1">
<option>淮安市</option>
<option>无锡市</option>
<option>苏州市</option>
<option>南京市</option>
<option>常州市</option>
</select>
</form>
<script>
var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++){
group[i]=new Array()
}
group[0][0]=new Option("淮安市")
group[0][1]=new Option("无锡市")
group[0][2]=new Option("苏州市")
group[0][3]=new Option("南京市")
group[0][4]=new Option("常州市")
group[1][0]=new Option("黄山市")
group[1][1]=new Option("滁州市")
group[1][2]=new Option("亳州市")
group[1][3]=new Option("安庆市")
group[1][4]=new Option("池州市")
group[2][0]=new Option("贵阳市")
group[2][1]=new Option("遵义市")
group[2][2]=new Option("毕节市")
group[2][3]=new Option("铜仁市")
group[2][4]=new Option("六盘水市")
var temp=document.doublecombo.stage2
function redirect(x){
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
}
</script>
</body>
</html>
效果图