Body Surface Area Calculator form { font-size: 16px; color: #333; font-family: sans-serif; } form label { font-weight: bold; } /* Set the width and padding of the form */ form { width: 500px; padding: 20px; } /* Style the input fields */ form input[type="number"] { width: 100%; padding: 12px 20px; margin: 8px 0; box-sizing: border-box; border: 2px solid #ccc; border-radius: 4px; } /* Style the button */ form button[type="button"] { width: 100%; background-color: #4CAF50; color: white; padding: 14px 20px; margin: 8px 0; border: none; border-radius: 4px; cursor: pointer; } /* Style the result text */ p { font-size: 18px; } Body Surface Area Calculator Weight (kg): Height (cm): Calculate Body Surface Area: function calculateBSA() { // Get weight and height values from form var weight = document.getElementById("weight").value; var height = document.getElementById("height").value; // Calculate Body Surface Area using the Mosteller formula var bsa = Math.sqrt((weight * height) / 3600); // Display result document.getElementById("bsa").innerHTML = bsa.toFixed(2); }