こんなのじゃだめかなぁ~?
<select id="a"></select>
<select id="b"></select>
<script type="text/javascript">
//@cc_on
var a_val = [0,1,2];
var a_txt = ['A','B','C'];
var b_val = [ [0,1,2],[0,1,2],[0,1,2] ];
var b_txt = [ ['A0','A1','A2'],['B0','B1','B2'],['C0','C1','C2']];
window.onload=function(){
setSelectOption('a',a_txt,a_val);
setSelectOption('b',b_txt[0],b_val[0]);
document.getElementById('a').onchange = function() {
setSelectOption('b',b_txt[this.value],b_txt[this.value],0);
}
}
function setSelectOption( elementId ,text_array, value_array, default_value, selected_value){
var element = ( typeof( elementId ) == 'string' )?
document.getElementById( elementId ) || document.getElementsByName( elementId )[0]: elementId;
while ( element.hasChildNodes() ) element.removeChild( element.lastChild );
for (var i=0, mx = text_array.length; i<mx; i++){
var n = new Option( text_array[i], value_array[i],(default_value==value_array[i]),(selected_value==value_array[i]));
element.add( n/*@if(0) */, null /*@end@*/);
}
}
</script>