3
In this my script how can I round up my result? I’m trying to use the (total.toFixed(2));
more does not work.
<input type="text" name="total" id="total" value="resultado" />
function updateValue(){
//atualiza os valores
inputQtd = parseFloat(document.getElementById("qtd").value);
inputValor = parseFloat(document.getElementById("valor").value);
inputMark = parseFloat(document.getElementById("mark").value);
//atualiza o valor no resultado
var total = document.getElementById("total");
total.value = (inputQtd * inputValor ) / inputMark;
}