Answers for "after decimal allow 4 digit and before decimal 2 using jquery"

3

jquery 2 decimal places

var total = 100.525444
var final_total = total.toFixed(2); // 100.52
Posted by: Guest on June-08-2020
0

get the integer after decimal in javascript

const number = 2.3;
const numberAfterDecimal = parseInt((number % 1).toFixed(2).substring(2));
const numberBeforeDecimal = parseInt(number);

console.log("value before decimal", numberBeforeDecimal);
console.log("value after decimal", numberAfterDecimal);
Posted by: Guest on May-25-2021

Code answers related to "after decimal allow 4 digit and before decimal 2 using jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language