![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
02/09/2007, 08:58
|
![Avatar de Raulmmmm](http://static.forosdelweb.com/customavatars/avatar173899_3.gif) | | | Fecha de Ingreso: marzo-2007 Ubicación: En otro lugar que tú
Mensajes: 1.549
Antigüedad: 17 años, 10 meses Puntos: 36 | |
Re: Ayuda con elementos de una lista desplegable Al nombre de la función y sus variables. Prueba esto:
<script type="text/javascript">
function asignaValor2()
{
var cboOpciones2 = document.getElementById( 'cboOpciones2' );
var txtValor2 = document.getElementById( 'txtValor2' );
txtValor2.value = cboOpciones2.value;
}
</script>
<form id="frmPrincipal2">
<select id="cboOpciones2" onchange="asignaValor2();">
<option value="1">uno</option>
<option value="2">dos</option>
<option value="3">tres</option>
</select>
<br />
El valor elegido en el combo es:
<br />
<input type="text" id="txtValor2">
</form> |