Ver Mensaje Individual
  #11 (permalink)  
Antiguo 20/01/2011, 09:55
Avatar de goteen_mx
goteen_mx
 
Fecha de Ingreso: abril-2005
Ubicación: D.F.
Mensajes: 403
Antigüedad: 19 años, 1 mes
Puntos: 37
Respuesta: color en menu

Ahi esta.

Código PHP:
<html>
<
body>

<
script type="text/javascript">

function 
f_cambiaColor(slect){ document.getElementById("slect_c").style.backgroundColor=slect.options[slect.selectedIndex].style.backgroundColor;
}

</script>



        <select id="slect_c" onchange="f_cambiaColor(this);">
             <option>Selecciona un color</option>
            <option style="background-color:#999999;">Option 1</option>
            <option style="background-color:#99CCFF;">Option 2</option>
        </select> 

</body>
</html> 
Saludos.