Tema: radio button
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/05/2003, 04:03
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años, 1 mes
Puntos: 772
Hola de nuevo:

<html>
<head>
<script language="JavaScript">
var valor = 0;
function actualizaValor(oRad){
valor = oRad.value; }

function mark() {
if (valor == 1 ) {
window.location.href='http://www.yahoo.com';
}
if (valor == 2) {
window.location.href='http://www.altavista.com';

}
}
</script>
</head>
<body>
<form name="frm" action="mark">
<table border="0">
<tr>
<td>
<input type="radio" name="valor" value="1" onclick="actualizaValor(this)" >Valor uno
</td>
<td>
<input type="radio" name="valor" value="2" onclick="actualizaValor(this) ">Valor dos
</td>
</tr>
<tr>
<td>
<input type="button" name="valor" value="Dime valor" onclick="mark()">
</td>
</tr>
</table>
</form>
</body>
</html>

¿Que tal así? Saludos,