5th Jul 2020, 10:44 PM
Joshua Flynn
Joshua Flynn - avatar
4 Respostas
+ 3
Your javascript is incorrect. Add the onclick="getBmi()" Attribute to the submit button in the html. Change your JS to; function bmi(height,weight) { return (weight / (weight * weight))*703; } function getBmi() { let weight = document.getElementById("weight").value; let height = document.getElementById("height").value; let bmiResult = bmi(height, weight); document.getElementById("bmi-result").value = bmiResult; } That should get it working for the most part.
5th Jul 2020, 11:17 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Thank you
5th Jul 2020, 11:20 PM
Joshua Flynn
Joshua Flynn - avatar
0
the mathematics are correct
5th Jul 2020, 10:48 PM
Joshua Flynn
Joshua Flynn - avatar
0
ChaoticDawg look at this updated version and let me know what you think https://code.sololearn.com/WUa2NwSRC36G/
6th Jul 2020, 3:56 AM
Joshua Flynn
Joshua Flynn - avatar