Height: meters
Weight: kilograms
BMI: kg/m2
BSA: m2

function getBMIBSA() {
var height = parseFloat($(“#height”).val());
var weight = parseFloat($(“#weight”).val());

var myBMI = weight / (height * height);
var myBSA = Math.sqrt((weight * height) / 3600);

var bmi = myBMI.toFixed(2);
var bsa = myBSA.toFixed(2);

if (isNaN(bmi)) bmi = 0;
if (isNaN(bsa)) bsa = 0;

$(‘#bmi’).val((bmi));
$(‘#bsa’).val((bsa));
}