Hola
dandreta y
karemlis
Un ejemplo:
Código PHP:
<html>
<head>
<script type="text/javascript">
function habilitar(frm) {
for (i=0; ele = frm.elements[i]; i++)
if (ele.type == 'text')
ele.disabled = false;
}
</script>
</head>
<body>
<form>
<input type="text" disabled="disabled" />
<input type="text" disabled="disabled" />
<input type="text" disabled="disabled" />
<input type="button" onclick="habilitar(this.form)" />
</form>
</body>
</html>
Para mostrar/ocultar un campo:
Código:
<form>
<form>
<input type="text" name="txt" style="display:none" />
<input type="button" onclick = "txt.style.display = 'block'" />
En lugar de
block también puede usarse
inline
Saludos,