Floating value multiply using jQuery:
parseFloat() in jQuery: sometimes you need to get multiple value of two different values using floating point arithmetic. In jQuery you can get decimal values multiple results using operator, when you get point in calculate value then you need to set parseFloat() method in your web site.
Follow the example code, which I write in the below of the post, you can use the codes in your websites and get the floating point result of a multiple result.
Get Floating Point Multiple Value:
<script> var value1 = $('#field1').val(); var value2 = $('#field2').val(); var multiply_val = parseFloat(value1) * parseFloat(value2); </script>
I think this tutorial will help you, if you get the floating point value and insert floating value in to the database. You need to careful, when you insert floating point value into database then change database table Data Type to float.
Related posts