There are two inputs, I want to enter numbers there and in the third get the result of the division. Where is the mistake? The result is not displayed.
function calc1() { var gold1, dps1, res1 gold1 = parseInt(document.getElementById("gold1").value); dps1 = parseInt(document.getElementById("dps1").value); res1 = gold1*dps1; document.getElementById("res1").value = res1; } <input id="gold1" placeholder="gold" onkeyup="calc1()"> <input id="dps1" placeholder="dps" onkeyup="calc1()"> <input id="res1" onkeyup="calc1()">