js 处理金额各个位数上的值
//金额处理 var number = 1234567.35; if (parseInt(number) == number) { var money = number.toString().split(''); var unit = money[money.length - 1]; var decade = money[money.length - 2]; var hunders = money[money.length - 3]; var kilbit = money[money.length - 4]; var myriabit = money[money.length - 5]; var debit = money[money.length - 6]; var hunbit = money[money.length - 7]; console.log(hunbit) }else{ var money = number.toString().split('.')[1]; var unitone = money.split('')[0]; var unittwo = money.split('')[1] }