Something like this, maybe?
function addNumbers(){
var input1 = Number(document.getElementById('input1').value);
var input2 = Number(document.getElementById('input2').value);
document.getElementById('output').value = input1 + input2;
}
<input type="text" onkeyup="addNumbers()" id="input1" placeholder="enter a number"><br />
<input type="text" onkeyup="addNumbers()" id="input2" placeholder="enter another number"><br />
<input type="text" id="output" disabled>
1
solved html forms that update in real time [closed]