In my script how can I round up my result? I'm trying to use (total.toFixed(2));
but it 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;
}