Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/02/2014, 09:13
kampa88
 
Fecha de Ingreso: febrero-2014
Mensajes: 4
Antigüedad: 10 años, 2 meses
Puntos: 0
Respuesta: problema ejercicio de clase

cierto:
<HTML>
<HEAD>
<TITLE>EJERCICIO Formulario</TITLE>
<META http-equiv="Content-Type" content="text/html;charset=UTF-8">


<script type="text/javascript">

function funcion3 ()
{
var i;
var radio=document.examen.col1;
for(i=0;i<radio.length;i++)
if(document.examen.texto2.value==radio[i].value)
document.examen.boton.disabled=false;
else
document.getElementById('cuadro').innerHTML="ERROR , valor fuera de rango";

}







</script>
</HEAD>

<BODY >
<H1> EJERCICIO 1 DE JAVASCRIPT versión 1.0</H1>
<form action="#" method="get" name="examen">

<P><INPUT type="radio" name="col1" value="1-5" onclick="funcion3()">1-5</P>
<P><INPUT type="radio" name="col1" value="6-10" onclick="funcion3()">6-10</P>
<P><INPUT type="radio" name="col1" value="11-20" onclick="funcion3()">11-20</P>
<P><INPUT type="radio" name="col1" value="21-30" onclick="funcion3()">21-30</P>
<P>INTRODUCE UN VALOR</P>
<P><INPUT type="text" name="texto2" size="30" onKeyPress="funcion3()">
<div id="cuadro"></div></P>
<P><INPUT type="submit" value="ENVIAR" name="boton" disabled></p>

</form>




</BODY>

</HTML>