Código HTML:
<!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=utf-8" /> <title>Sin título 1</title> </head> <body> <form name="form1" id="form1"> <label> <select class="td3" id="raza" name="raza" size="1" onchange="redirect(this.options.selectedIndex)"> <option selected="selected">--Escoja una Raza--</option> <option value="001">Humano</option> <option value="002">Argonauta</option> <option value="003">Enano</option> <option value="004">Arunos (Elfo)</option> </select> <select class="td3" id="prof" name="prof" size="1"> <option selected="selected" value="">--Escoja una Profesión--</option> <option value="">Prof. Humanos</option> <option value="">Prof. Argonautas</option> <option value="">Prof. Enanos</option> <option value="">Prof. Arunos(Elfo)</option> </select> </label> <label> <script language="javascript" type="text/javascript"> var groups=document.form1.raza.options.length var group=new Array(groups) for (i=0; i<groups; i++) group[i]=new Array() group[0][0]=new Option("Escoja una Profeción","0000"); group[1][0]=new Option("Selecione una Profeción","0000"); group[1][1]=new Option("Guerrero","0001"); group[1][2]=new Option("Paladin(Caballero)","0002"); group[1][3]=new Option("Mercenario(Asesino)","0003"); group[1][4]=new Option("Mago","0004"); group[1][5]=new Option("Sacerdote","0005"); group[1][6]=new Option("Brujo","0006"); group[2][0]=new Option("Selecione una Profeción","0000"); group[2][1]=new Option("Paladin(Caballero)","0002"); group[2][2]=new Option("Mago","0004"); group[2][3]=new Option("Sacerdote","0005"); group[3][0]=new Option("Selecione una Profeción","0000"); group[3][1]=new Option("Guerrero","0001"); group[3][2]=new Option("Paladin(Caballero)","0002"); group[3][3]=new Option("Cazador","0007"); group[4][0]=new Option("Selecione una Profeción"," "); group[4][1]=new Option("Guerrero","0001"); group[4][2]=new Option("Paladin(Caballero)","0002"); group[4][3]=new Option("Mago","0004"); group[4][4]=new Option("Sacerdote","0005"); var temp=document.form1.prof function redirect(x){ for (m=temp.options.length-1;m>0;m--) temp.options[m]=null for (i=0;i<group[x].length;i++){ temp.options[i]=new Option(group[x][i].text,group[x][i].value); } temp.options[0].selected=true } </script> </label> </form> </body> </html>