Calculate with a formula base on input values in a and b fields.
And write the result on the <p> with id="result", replacing the initial 0.
The result should be calculated and show up instantly when inputting the value.
Actually, the real case is like this: https://codepen.io/pen/vYRzVXG
Obviously, I’ve got something wrong and it does not work.
window.onload = function () {
calcFee();
};
function calcFee() {
var valueA = document.getElementById("input-01").value;
var valueB = document.getElementById("input-02").value;
const capicity = valueA * 288;
document.getElementById("calc-bottles").textContent = capicity;
document.getElementById("calc-price").innerHTML =
capicity * 3.2 * 12 * valueB;
}