var val = '74.44'; var left = ('0' + val.split('.')[0]) left = left.substring(left.length - 2); var right = val.split('.')[0]; var output = left + '.' + right; alert(output);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)