ceu-notes/1/LMSGI/PromedioNotas/promedio-notas.html

30 lines
1.0 KiB
HTML
Raw Permalink Normal View History

2022-04-26 18:05:23 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Promedio de Notas</title>
<script type="text/javascript">
function average() {
var notaISO = parseInt(document.getElementById("notaISO").value);
var notaLMSGI = parseInt(document.getElementById("notaLMSGI").value);
var notaGBD = parseInt(document.getElementById("notaGBD").value);
var avg = (notaISO + notaLMSGI + notaGBD)/3;
2022-04-26 18:11:19 +00:00
document.getElementById("result").innerHTML = "<p>Resultado: " + avg + "</p>";
2022-04-26 18:05:23 +00:00
}
</script>
</head>
<body>
<h1>Calculadora Promedio Notas</h1>
2022-04-26 18:11:19 +00:00
<form onsubmit="event.preventDefault(); average()" >
2022-04-26 18:05:23 +00:00
<label>ISO:</label><br />
<input type="number" id="notaISO" name="notaISO" min="0" max="10" value="0" ><br />
<label>LMSGI:</label><br />
<input type="number" id="notaLMSGI" name="notaLMSGI" min="0" max="10" value="0" ><br />
<label>GBD:</label><br />
<input type="number" id="notaGBD" name="notaGBD" min="0" max="10" value="0" ><br />
2022-04-26 18:11:19 +00:00
<input type="submit" >
2022-04-26 18:05:23 +00:00
</form>
2022-04-26 18:11:19 +00:00
<div id="result" ></div>
2022-04-26 18:05:23 +00:00
</body>
</html>