JSFiddle - React, Tailwind, and code Playground

HTML

<input id='one' type='text' value='285.72' /><br>
<input id='two' type='text' value='142.86' /><br>
Result: <input id='result' type='text' /><br>
Result Fixed: <input id='resultFixed' type='text' /><br>
<br>
<div id='click' style='cursor:pointer; border:solid 1px Black; text-align:center; width:100px;'>Click to add</div>

JavaScript

$('#click').click(function() {
    var one = parseFloat($('#one').val());
    var two = parseFloat($('#two').val());
    var result = one + two;
    $('#result').val(result.toString());
    $('#resultFixed').val(result.toFixed(2).toString());
});