Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/09/2005, 10:17
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola xias

Suponiendo que tengas este select:

<select id="sel" multiple>

Puedes usar esta función:
Código PHP:
function mostrar() {
  
txt '';
  
obj document.getElementById('sel');
  for (
i=0opt=obj.options[i]; i++)
    if (
opt.selected) { 
      
txt += (txt=='') ? '' '-';
      
txt += opt.value; }
  
alert(txt); 

Saludos,