How can I make an automatic update of the second input'a ?

Ie let's say I enter the number in the first input and it automatically, using the formula, calculates and displays the value in the 2nd. It turned out to be done with a simple diva, but I don’t understand how to make the same output in input .

 <input type="text" onkeyup="document.getElementById('total').innerHTML=parseFloat(10*this.value)" /> <div id="total"></div> 

    1 answer 1

    Replace innerHTML with value .

     <input type="text" onkeyup="document.getElementById('total').value=parseFloat(10*this.value)"/> <input id="total" value="">