Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/03/2004, 11:39
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Hola, The_omars.

Prueba este código:
Código PHP:
<html>
<
head>
<
script>
function 
desactiva(obj) {
    
frm=obj.form.elements;
    for(
i=0;i<frm.length;i++)
        if(
frm[i].type=='text'
            
frm[i].disabled= !obj.checked;;
}
</script>
</head>

<body>
<form>
<input type="text" />
<input type="text" />
<input type="checkbox" onclick="desactiva(this)" />
</form>
</body>
</html> 
Saludos,