![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/08/2006, 11:21
|
| | Fecha de Ingreso: junio-2006 Ubicación: Ibiza
Mensajes: 16
Antigüedad: 18 años, 7 meses Puntos: 0 | |
Hola:
aqui te pongo una manera de saber en cual te han clicado, una vez que sepas en cual te han clicado, puedes hacer un document.getElementById('id').value para recoger el valor del botón y ya hacer lo que quieras con él.
Te marco en negrita los cambios.
Espero te sea de ayuda.
<script LANGUAGE="JavaScript">
function irA(){ x=y=0;
if(document.getElementById('r1').checked==true) x=1;
if(document.getElementById('r2').checked==true) y=2;
alert (x);
alert (y);
}
</script>
<table width="22%" border="0" class="menu1" align="center">
<tr>
<td width="49%" rowspan="2" class="Campo"><strong>Monto a financiar</strong></td>
<td width="9%" align="center"><input type="radio" value="1" id="r1" name="R1" checked onclick="irA()"></td>
<td width="15%" class="Campo"><strong>UF</strong></td>
<td width="27%" rowspan="2"><input name="txtPorcentaje" size="8" value="10"></td>
</tr>
<tr>
<td align="center"><input type="radio" name="R1" id="r2" value="2" onclick ="irA()"></td>
<td class="Campo"><strong>%</strong></td>
</tr>
</table> |