Puedo llenar un campo de texto de lista desplegable abajo. Ayudar a hacerla p

  • basketmen
  • Student
  • Student
  • No Avatar
  • Registrado: Mar 21, 2007
  • Mensajes: 66
  • Status: Offline

Nota Abril 12th, 2012, 11:22 pm

Aquí hay una secuencia de comandos simple, para llenar un campo de texto de lista desplegable hacia abajo,
por ejemplo cómo funciona: en usuario haciendo clic en la opción 1 y, a continuación, el showValue1 de textfield será llenado y dispararon con 1a



Quote:
<!DOCTYPE HTML público "-//W3C//DTD HTML 4.01 transicional / / EN" >
<html>
<head>
<title> sin título </title>
</head>
<body>
< nombre del formulario = "theform" onsubmit="CheckForm()" >
< select nombre = "myOptions" onchange="document.theform.showValue1.value=this.value" >
< opción valor = "" > seleccione una opción </option>
< opción valor = "1a" > 1 </option>
< opción valor = "2a" > 2 </option>
< opción valor = "3a" > 3 </option>
< opción valor = "4a" > 4 </option>
</select>
< input type = "text" name = "showValue1" >< br >
</form>
</body>
</html>







Ahora necesito dos para insertar valor dos, en el campo de texto dos junto, cuando usuario elegir una opción
por ejemplo: usuario haciendo clic en la opción 1, entonces el showValue1 de textfield será llenado y dispararon con 1a,
y el segundo textfield, permite decir showValue2 será llenado y dispararon con permite decir 1b




ya probé añadido a continuación en rojo, pero aún no su trabajo

Quote:
<!DOCTYPE HTML público "-//W3C//DTD HTML 4.01 transicional / / EN" >
<html>
<head>
<title> sin título </title>
</head>
<body>
< nombre del formulario = "theform" onsubmit="CheckForm()" >
< select nombre = "myOptions" onchange="document.theform.showValue1.value=this.value [COLOR =" #FF0000 "] & amp; document.theform.showValue2.value2=this.value2[/COLOR]" >
< opción valor = "" > seleccione una opción </option>
< opción valor = "1a" [COLOR = " #FF0000"] & amp; valor2 = "1b" [/ COLOR] > 1 </option>
< opción valor = "2a" [COLOR = " #FF0000"] & amp; valor2 = "2b" [/ COLOR] > 2 </option>
< opción valor = "3a" [COLOR = " #FF0000"] & amp; valor2 = "3b" [/ COLOR] > 3 </option>
< opción valor = "4a" [COLOR = " #FF0000"] & amp; valor2 = "4b" [/ COLOR] > 4 </option>
</select>
< input type = "text" name = "showValue" > [COLOR = " #FF0000"] < input type = "text" name = "showValue2" > [/COLOR] <br>
</form>
</body>
</html>






Comparta sus conocimientos, ¿cómo es el código de derecho?
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Abril 12th, 2012, 11:22 pm

  • Satwant
  • Graduate
  • Graduate
  • Avatar de Usuario
  • Registrado: Dic 27, 2010
  • Mensajes: 126
  • Loc: Bangalore
  • Status: Offline

Nota Mayo 11th, 2012, 11:11 pm

Es este trabajo

[HTML]
<!DOCTYPE HTML público "-//W3C//DTD HTML 4 & #46; 01 transición / / EN" >
<html>
<head>
<title> sin título </title>
</head>
<body>
< nombre del formulario = "theform" onsubmit="CheckForm()" >
< select nombre = "myOptions" onchange = "documento & #46; theform & #46; showValue & #46; valor = esta & #46; valor de documento & #46; theform & #46; showValue2 & #46; valor = esta & #46; opciones & #91; este & #46; selectedIndex & #93; & #46; texto" >
< opción valor = "" > seleccione una opción </option>
< opción valor = valor2 "1a" = "1b" > 1b </option>
< opción valor = valor2 "2a" = "2b" > 2b </option>
< opción valor = valor2 "3a" = "3b" > 3b </option>
< opción valor = valor2 "4a" = "4b" > 4b </option>
</select>
< input type = "text" name = "showValue" / >
< input type = "text" name = "showValue2" >
</form>
</body>
</html>
[/HTML MÁS EXTERNAS]
Thank You
Satwant Singh Hundal
http://www.mrhundal.com

Publicar Información

  • Total de mensajes en este tema: 2 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 135 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC