Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/01/2007, 17:25
Avatar de caricatos
caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 11 meses
Puntos: 1284
Re: Select multiple

Hola:

A ver si te sirve:

Código:
<html>
<head>
<script>
function howmuch(f) {
 cuenta = 0;
 datos = new Array();
 for (i = 0, total = f.length; i < total; i ++)
  if (f[i].selected) datos[cuenta++] = f[i].value;
 alert(datos.join(","));
}
</script>
</head>
<body>
<form name=a >
<select name=m multiple >
<option value="a" >a</option>
<option value="b" >b</option>
<option value="c" >c</option>
<option value="d" >d</option>
<option value="e" >e</option>
<option value="f" >f</option>
</select>
<button type=button onclick='howmuch(m)' >recontar</button>
</form>
</body>
</html>
Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo