aca tengo algo que hice hace un par de años en la facultad, no se si esta bien perom te puede ayudar.
Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ejercicio 2</title>
<style>
h1 {text-align: center;
text-decoration: underline}
p {font-weight: bold}
</style>
<script>
var total=0;
function ejer1 (){
var t=0;
if (parseInt(document.getElementById("cuenta1").value) == 158)
t += 10;
if (parseInt(document.getElementById("cuenta2").value) == 195)
t += 10;
if (parseInt(document.getElementById("cuenta3").value) == 209)
t += 10;
return (t);
}
function ejer2a (){
if (document.getElementById("incaa").checked)
return (15);
else return (0);
}
function ejer2b (){
if (document.getElementById("incba").checked)
return (15);
else return (0);
}
function ejer3(){
q=0;
if (document.getElementById("m4").checked)
q += 10;
if (document.getElementById("m5").checked)
q += 10;
if (document.getElementById("m6").checked)
q += 10;
if (document.getElementById("m8").checked)
q += 10;
return (q);
}
function ensamble(){
total += ejer1();
total += ejer2a();
total += ejer2b();
total += ejer3();
document.getElementById("resultado").value = total;
if ((total > 60) && (total = 100))
document.getElementById("nota").value = 'EXCELENTE';
if ((total >= 0) && (total < 40))
document.getElementById("nota").value = 'MALO';
if (d(total >= 40) && (total <= 60))
document.getElementById("nota").value = 'BUENO';
}
</script>
</head>
<body>
<h1>Evaluación de Matemáticas</h1>
<form name="examen" id="examen" action="">
<p>Ej:1 Realice las siguientes cuentas</p>
<p>a- 124 + 34 <input type="text" size=5 name="cuenta1" id="cuenta1"> 10 pts.</p>
<p>b- 230 - 45 <input type="text" size=5 name="cuenta2" id="cuenta2"> 10 pts.</p>
<p>c- 120 + 89 <input type="text" size=5 name="cuenta3" id="cuenta3"> 10 pts.</p>
<p>Ej:2 Seleccione el valor de la icognita</p>
<p>a- Si Juan tiene el triple de edad de Pedro y la edad de Pedro es la mitad que la de Roberto y junto
suman 30 años. ¿Cuántos años tiene Juan? (15pts)</p>
<p>Juan: 9<input type="radio" name="inc" id="incaa">
Juan: 12<input type="radio" name="inc" id="incab">
Juan: 15<input type="radio" name="inc" id="incac"></p>
<p>b- Ana saca en un examen 20 ptos mas que Elena. Elena saca la mitad de puntos de Roberto y
entre Elena y Roberto sacaron 80pts.. ¿Cuántos saca Ana? (15pts)</p>
<p>Ana: 50 pts.<input type="radio" name="incb" id="incba">
Ana: 60 pts.<input type="radio" name="incb" id="incbb">
Ana: 30 pts.<input type="radio" name="incb" id="incbc"></p>
<p>Ej3: Seleccione, colocando un tilde, en los números que sean múltiplos de 6: (40pts)</p>
<p> 20 <input type="checkbox" value="" name=m1 id=m1>
45 <input type="checkbox" value="" name=m2 id=m2>
64 <input type="checkbox" value="" name=m3 id=m3></p>
<p> 30 <input type="checkbox" value="" name=m4 id=m4>
48 <input type="checkbox" value="" name=m5 id=m5>
66 <input type="checkbox" value="" name=m6 id=m6></p>
<p> 35 <input type="checkbox" value="" name=m7 id=m7>
60 <input type="checkbox" value="" name=m8 id=m8>
70 <input type="checkbox" value="" name=m9 id=m9></p>
<p>PUNTAJE TOTAL: <input type="text" name="resultado" id="resultado"><br><br>
NOTA FINAL: <input type="text" name="nota" id="nota"><br><br>
<input type="button" value="Corregir" onClick="ensamble()"></p>
</form>
</body>
</html>
saludos