el hecho es que no consigo andar el contador no se que estoy haciendo mal
me gustaria que me ayudaran
Código PHP:
<script>
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== true))
{
resultado++;
document.examen.elements[i].style.background ="#009900";
//alert("Has respondido correctamente un total de: "+resultado+ " preguntas.");
}
}
for (i=0;i<document.examen.elements.length;i++)
{
if ((document.examen.elements[i].type=="radio") &&(document.examen.elements[i].value=="mal")&&(document.examen.elements[i].checked== true))
{
document.examen.elements[i].style.background ="#EF1400";
alert("Has respondido incorrectamente .");
document.examen.elements[i].style.background ="#FFFFFF";
}
}
}
</script>
<form name="examen" onSubmit="">
<table align="center">
<tr>
<td>
<strong>1.Which of the following is the BEST definition of the term Service Management?</strong>
<br>
A.<input type="radio" name="respuesta" onClick="averiguarNota()"value="bien">
A set of specialised organisational capabilities for providing value to customers in the form of services.
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
B.<input type="radio" name="respuesta" onClick="averiguarNota()" value="mal">
A group of interacting, interrelated, or independent components that form a unified whole, operating together for a common purpose
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
C.<input type="radio" name="respuesta" onClick="averiguarNota()" value="mal">
The management of functions within an organisation to perform certain activities
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
D.<input type="radio" name="respuesta" onClick="averiguarNota()"value="mal">
Units of organisations with roles to perform certain activities
<p style="word-spacing: 0"> </p><br />
</td></tr>
<tr>
<td>
<strong>2.Implementation of ITIL Service Management requires preparing and planning the effective and efficient use of:</strong>
<br>
A.<input type="radio" name="respuesta" onClick="averiguarNota()"value="mal" >
People, Process, Partners, Suppliers
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
B.<input type="radio" name="respuesta" onClick="averiguarNota()" value="mal" >
People, Process, Products, Technology
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
C.<input type="radio" name="respuesta" onClick="averiguarNota()" value="bien" >
People, Process, Products, Partners
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
D.<input type="radio" name="respuesta" onClick="averiguarNota()"value="mal" >
People, Products, Technology, Partners
<p style="word-spacing: 0"> </p>
</td></tr>
<tr><td>
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">20.
quien gano el gran premio de china¡¡<br>
<br>
<input type="radio" name="respuesta" onClick="averiguarNota()"value="bien">
rossi</p>
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
<input type="radio" name="respuesta20" onClick="averiguarNota()" value="mal">
webber</p>
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
<input type="radio" name="respuesta" onClick="averiguarNota()" value="mal">
trulli</p>
<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
<input type="radio" name="respuesta" onClick="averiguarNota()"value="mal">
vetel </p>
<p style="word-spacing: 0"> </p>
</td></tr>
</table>
</form>
<p>
