Ver Mensaje Individual
  #8 (permalink)  
Antiguo 13/10/2009, 12:37
Avatar de tampon
tampon
 
Fecha de Ingreso: julio-2009
Mensajes: 420
Antigüedad: 15 años, 6 meses
Puntos: 0
Respuesta: Habilitar / deshabilitar input pasándole foco con checkbox

Ok si me estaba equivocando mucho , peor gracias ya quedo bien.

Código html:
Ver original
  1.  
  2. function foco1(){
  3. var chek = document.formulario.chkbx1
  4.     if (chek.checked == true) {
  5.         document.formulario.eva.disabled = false;
  6.         document.formulario.eva.focus();
  7.     }else{
  8.         document.formulario.eva.value="";
  9.         document.formulario.eva.disabled
  10.     }
  11. }
  12.  
  13. </head>
  14.  
  15. <form name="formulario">
  16. <input type="checkbox" name="chkbx1" onClick="foco1()" />
  17. <input type="text" name="eva" disabled />
  18. </form>
  19.  
  20. </body>
  21. </html>

saludos!