I am making a calculation tool. I am not very familiar with javascript, so my code looks a bit off. What edits should be made to make this tool work? I want the input numbers calculated just like the equation below:
calculate = function()
{
var x = document.getElementById('a').value;
var y = document.getElementById('b').value;
var z = document.getElementById('c').value;
document.getElementById('result').value = x * 588 + y * 28 + z + 44032
}
<input type="number" id="a" oninput="calculate()"/> × 588 +
<input type="number" id="b" oninput="calculate()"/> × 28 +
<input type="number" id="c" oninput="calculate()"/> + 44032 =
<input type='text' id="result"/>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…