Estou com problemas com esse codigo, quando eu realizo ela dá um resultado errado e não consigo limitar casa decimais. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> function calcular() { var peso = parseInt(document.getElementById('peso').value); var alt = parseInt(document.getElementById('alt').value); document.getElementById('imc').innerHTML = peso / Math.pow(alt, 2); } <!-- language: lang-html --> <form action="#" method="post" enctype="multipart/form-data"> <div class="form-row"> <div class="form-group col-md-3"> <label for="inputPeso"> <h6><strong>Peso</strong></h6> </label> <input type="text" class="form-control" id="peso" name="peso" placeholder="Insira Peso (kg)" onfocus="calcular()"> </div> <div class="form-group col-md-3"> <label for="inputAddress2"><h6><strong>Altura</strong></h6></label> <input type="text" class="form-control" id="alt" name="alt" placeholder="Insira Altura (m)" onblur="calcular()"> </div> <div class="form-group col-md-3"> <label for="inputAddress2"><h6><strong>IMC</strong></h6></label> <div type="text" class="form-control" id="imc" name="imc"></div> </div> </div> </form> <!-- end snippet -->