Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/09/2010, 20:46
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 11 meses
Puntos: 310
Respuesta: Validación con JavaScript

Código Javascript:
Ver original
  1. onload=function(){document.getElementById('btn').disabled=true;}
  2. function habil(c){
  3.  document.getElementById('btn').disabled=c.value.length<=4 ? true : false;
  4. }
Código HTML:
Ver original
  1. <form action="zaraza.php" method="post">
  2.  
  3.    <input type="text" name="texto1" onkeyup='habil(this);' onblur='habil(this);' />
  4.  
  5.    <input type="submit" value="enviar" id='btn' />
  6.  
  7. </form>

Saludos (:
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red