Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/09/2009, 13:53
sebastian85
 
Fecha de Ingreso: mayo-2009
Mensajes: 71
Antigüedad: 15 años
Puntos: 1
como hacer que tambien se habiliten los inputs en el mismo boton

hola como estan googleando encontre un codigo que estaba posteado aca mismo lo ejecute pero le falta que en el mismo boton tambien se pueda habilitar ya que solo quedan desabilitados los inputs si alguien me ayuda se lo agradeceria. gracias

Código HTML:
<script type="text/javascript">
function Deshabilitar(){
Forma = document.getElementById("MiForma");
Elementos = Forma.getElementsByTagName("input");
alert('Se encontraron '+Elementos.length+' Elementos que se van a deshabilitar');
for (i=0;i<Elementos.length;i++){
Elementos[i].disabled = true;
}
}
</script>

<form id="MiForma" method="post" action="">
<input type="text" name="textfield">
<input type="text" name="textfield2">
<input type="text" name="textfield3">
<input type="text" name="textfield4">
<a href="javascript: Deshabilitar();">Deshabilitar</a><br>
<input type="text" name="textfield5">
</form>