JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="value_one" /><br />
<input type="text" id="value_two" /><br />
<input type="text" id="total_value" /><br />

JavaScript

$("body").hover(function() {
    var a = +$('#value_one').val();
    var b = +$('#value_two').val();
    var total = a+b;
    $('#total_value').val(total);
 
});