Foros del Web » Creando para Internet » HTML »

Direccionar a otra pagina con input type radio

Estas en el tema de Direccionar a otra pagina con input type radio en el foro de HTML en Foros del Web. <tr> <td> <b><i>APELLIDOS Y NOMBRE:</b></i> <td> <input type="radio" name="consulta" value = "apell"/> </td> </td> </tr> <tr> <td> <b><i>CEDULA:</b></i> <td> <input type="radio" name="consulta" value = "Cedu"/> ...
  #1 (permalink)  
Antiguo 10/03/2015, 21:01
 
Fecha de Ingreso: marzo-2015
Mensajes: 1
Antigüedad: 9 años, 1 mes
Puntos: 0
Direccionar a otra pagina con input type radio

<tr>
<td>
<b><i>APELLIDOS Y NOMBRE:</b></i> <td> <input type="radio" name="consulta" value = "apell"/> </td>
</td>
</tr>
<tr>
<td>
<b><i>CEDULA:</b></i> <td> <input type="radio" name="consulta" value = "Cedu"/> </td>
</td>
</tr>
<tr>
<td>
<b><i>HCU:</b></i> <td> <input type="radio" name="consulta" value = "hcu"/> </td>
</td>
</tr>
<tr>
<td>
<b><i>FECHA DE NACIMIENTO:</b></i> <td> <input type="radio" name="consulta" value = "fnac"> </td>
</td>
</tr>
</table>
</p>
</form>
<center>
<input class = "btn btn-danger" type="submit" name="submit" value="Consultar"/>


ESTE ES MI CODIGO LO QUE QUIERO ES QUE AL SELECCIONAR UN INPUT Y DAR CLICK EN EL BOTON CONSULTAR ME DIRECCIONE A LA PAGINA PARA PODER REALIZAR UN CONSULTA X APELLIDOS Y NOMBRE, SI ESCOJO HCU Y DOY CLICK EN CONSULTAR ME DIRECCIONE A LA PAG DONDE HARE CONSULTA DE HCU. AGRADECERIA LA AYUDA. GRACIAS DE ANTEMANO
  #2 (permalink)  
Antiguo 10/03/2015, 22:27
Avatar de AngelKrak  
Fecha de Ingreso: noviembre-2014
Mensajes: 917
Antigüedad: 9 años, 4 meses
Puntos: 91
Respuesta: Direccionar a otra pagina con input type radio

con este codigo puedes, ya nomas modificalo por lo tuyo k tienes ;)

Cita:
<script>
function verificar(lolo)
{
for (var i=0;i<document.form1.radiobutton.length;i++)
{
if (document.form1.radiobutton[i].checked)
{

var msn = document.form1.radiobutton[i].value ;
document.location="http://www."+msn;
break;
}
}

}
</script>
Cita:
<form id="form1" name="form1" method="post" action="">
<label>
<input name="radiobutton" type="radio" value="dragons-mw.hol.es" checked="checked"/>
Dragons</label>
<p>
<label>
<input name="radiobutton" type="radio" value="blockpost.skn1.com" />
BlockPost</label>
</p>

<input type="Button" name="" value="Enviar" onclick="verificar()">
</form>

Etiquetas: direccionar, input, radio, type
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:57.