![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
01/02/2011, 13:41
|
![Avatar de goteen_mx](http://static.forosdelweb.com/customavatars/avatar95811_1.gif) | | | Fecha de Ingreso: abril-2005 Ubicación: D.F.
Mensajes: 403
Antigüedad: 19 años, 10 meses Puntos: 37 | |
Respuesta: Problema con defauldSelected opcion0=new Option("Rojo","rojo");
opcion1=new Option("Azul","azul");
opcion2=new Option("Verde","verde");
document.frm.color.options[0]=opcion0;
document.frm.color.options[1]=opcion1;
document.frm.color.options[2]=opcion2;
document.frm.color.selectedIndex=2;
o tambien
var aColores=new Array('rojo','azul','verde' );
document.frm.color.options=0;
for(var i=0;i<aColores.length;i++){
document.frm.color.options.length++;
document.frm.color.options[i].value=aColores[i];
document.frm.color.options[i].text=aColores[i];
}
document.frm.color.selectedIndex=2;
El defaultSelected a veces da problemas en FF
Saludos. |