Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/03/2008, 05:29
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años, 1 mes
Puntos: 772
Re: Mostrar en TextField elementos de una Lista/Menu

Hola aml84

Prueba este ejemplo:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
marcar(obj) {
  var 
texto ='';
  for (
i=0opt obj.options[i]; i++)
    if (
opt.selected)
      
texto += opt.value+' ';
  
obj.form.txt.value texto;
}
</script>
</head>
<body>
<form>
<select size="4" multiple="multiple" onchange="marcar(this)">
<option value="Uno">Uno</option>
<option value="Dos">Dos</option>
<option value="Tres">Tres</option>
<option value="Cuatro">Cuatro</option>
</select>
<input type="text" name="txt" />
</form>
</body>
</html> 
Saludos,