-3
I wanted to make a program that the user would send 3 notes and after pressing "Calculate", you would be redirected to a page that would appear your average. Who could help me:
function calcular()
{
var ac1 = parseInt(document.getElementById('ac1').value, 10);
var ac2 = parseInt(document.getElementById('ac2').value, 10);
var ac4 = parseInt(document.getElementById('ac4').value, 10);
var media = ((ac1*2)+(ac2*2)+ac4)/5;
alert("Sua média desta etapa foi "+media);
}
<html>
<head>
<style>
input {
margin-left: 100px;
width: 45px;
}
</style>
</head>
<body>
<form action="/teste1pag2" method="get">
Digite sua nota da Ac1 aqui: <input type="number" id="ac1" min="0" max="10"> <br>
Digite sua nota da Ac2 aqui: <input type="number" id="ac2"> <br>
Digite sua nota de participação aqui:
<input type="text" id="ac4" style="margin-left: 49px"> <br>
<input type="submit" onblur="calcular()" value="Calcular!">
</form>
</body>
</html>
https://pt.meta.stackoverflow.com/questions/5483/manual-de-como-n%C3%83o-fazer-perguntas/5485#5485
– user60252
opa mano, I learned already rs
– TrollApocalipse
Learn more by touring the Sita https://answall.com/tour
– user60252
When an answer solves your problem mark it as accepted. See how in https://i.stack.Imgur.com/jx7Ts.png and why in https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252