18/04/2003, 17:33
|
| Moderadora | | Fecha de Ingreso: agosto-2001 Ubicación: Terok Nor
Mensajes: 16.805
Antigüedad: 23 años, 3 meses Puntos: 381 | |
Buenas, a ver si te gusta este
<script language="JavaScript">
function activar(pepe,bartolo)
{
if(pepe.value=="")
{activo = true}
else{activo = false}
for(m=0;m<bartolo.elements.length;m++)
{
if(bartolo.elements[m].name==pepe.name)
{continue}
else
{
bartolo.elements[m].disabled=activo
}
}
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<table width="50%" border="1" align="center" bordercolor="#9900FF" bgcolor="#FFFFF8">
<tr>
<td width="48%" align="right">Campo1</td>
<td width="52%"><input type="text" name="textfield" onKeyUp="activar(this,this.form)" onBlur="activar(this,this.form)"></td>
</tr>
<tr>
<td align="right">Campo1</td>
<td><input type="text" name="textfield2" disabled></td>
</tr>
<tr>
<td align="right">Campo1</td>
<td><input type="text" name="textfield3" disabled></td>
</tr>
<tr>
<td align="right">Campo1</td>
<td><input type="text" name="textfield4" disabled></td>
</tr>
<tr align="center">
<td colspan="2">pepe <input type="checkbox" name="checkbox" value="checkbox" disabled>
Paco <input type="checkbox" name="checkbox2" value="checkbox" disabled>
Bartolo <input type="checkbox" name="checkbox3" value="checkbox" disabled> </td>
</tr>
<tr align="center">
<td colspan="2">Sí <input type="radio" name="radiobutton" value="radiobutton" disabled>
no <input type="radio" name="radiobutton" value="radiobutton" disabled></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="Submit" value="Enviar"></td>
</tr>
</table>
</form>
</body> |