Ver Mensaje Individual
  #8 (permalink)  
Antiguo 30/07/2008, 05:40
macbaldo
 
Fecha de Ingreso: abril-2008
Ubicación: Murcia
Mensajes: 46
Antigüedad: 16 años
Puntos: 0
Respuesta: test para hacer examen autocorregible

Gracias tunait, entre tu página y la anteriorr mas o menos sale lo que busco.

Para SAdico el codigo javascript:

function averiguarNota() {
var resultado=0;
var nivel=" ";

for (i=0;i<document.examen.elements.length;i++)
{
if ((document.examen.elements[i].type=="radio") &&
(document.examen.elements[i].value=="bien") &&
(document.examen.elements[i].checked))
{
resultado++;

}
}
for (i=0;i<document.examen.elements.length;i++)
{
if ((document.examen.elements[i].type=="radio") &&
(document.examen.elements[i].value=="bien"))

document.examen.elements[i].style.background ="#000000";
}


alert("Has respondido correctamente un total de: "+resultado+ " cuestiones.");


}

y el html :
Código HTML:
<form name="examen" onSubmit="">
                         <p> 1. 
                                  You have to ___your cigarette _____ when you 
                                  enter the non-smoking area. <br>

                                  <br>
                                  &nbsp;&nbsp; &nbsp; 
                                  <input type="radio" name="respuesta1" value="mal">
                                  let ... down</p>
                                <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp; 
                                  &nbsp; 
                                  <input type="radio" name="respuesta1" value="bien">
                                  put .... out </p>
                                <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp;&nbsp;&nbsp; 
                                  <input type="radio" name="respuesta1" value="mal">

                                  pull .... down<br>
                                  &nbsp;&nbsp;&nbsp;&nbsp; 
                                  <input type="radio" name="respuesta1" value="mal">
                                  give ... away<br>
                                </p>

<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">20. 
                                  My sister is very intelligent. Everybody ______ 
                                  to her.<br>
                                  <br>
                                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                  <input type="radio" name="respuesta20" value="bien">
                                  &nbsp;looks up </p>
                                <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                  <input type="radio" name="respuesta20" value="mal">
                                  &nbsp;looks after</p>

                                <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                  <input type="radio" name="respuesta20" value="mal">
                                  &nbsp;looks in</p>
                                <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"> 
                                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                                  <input type="radio" name="respuesta20" value="mal">
                                  &nbsp;looks at &nbsp;</p>
                              
                          </form>
                        <p> 
                          <input type="submit" value="Corregir ejercicio" onClick="averiguarNota()" name="submit" >