<!DOCTYPE html>
<html lang="en">
<head> </head>
<body translate="no">
<input type="number" placeholder="user enter's here" name="price" id="get" />
<input type="number" name="reduced" value="0.0039" id="qty_1" />
<input type="number" placeholder="output" name="total" id="send" readonly />
<script src="https://cpwebassets.codepen.io/assets/common/stopExecutionOnTimeout-1b93190375e9ccc259df3a57c1abc0e64599724ae30d7ea4c6877eb615f89387.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script id="rendered-js">
$(function () {
$("#get, #reduced").keyup(function () {
var input = $("#get").val() || 0;
var input2 = $("#reduced").val() || 0;
$("#send").val(input - input2);
});
});
//# sourceURL=pen.js
</script>
</body>
</html>
i do have a code which substract the amount user enter's and when user enter an decimal number it will show very long number how can i short it to two places 39409.44 i tried adding .tofixed(2)
and other didn't work