/**
* 數字金額轉化大寫金額
* @param val string/number(字串可包含『¥』和多餘的0)
* @returns
* 原生方法
*///**如下所示:
function
convertcurrency
(money)
if(typeof(money) === "string" )
if (money >= maxnum)
if (money == 0)
//轉換為字串
money = money.tostring();
if (money.indexof('.') == -1) else
//獲取整型部分轉換
if (parseint(integernum, 10) > 0) else
//歸零
zerocount = 0;
chinesestr += cnnums[parseint(n)] + cnintradice[m];
}if (m == 0 && zerocount < 4)
}chinesestr += cnintlast;
}//小數部分
if (decimalnum != '') }}
if (chinesestr == '') else
if (decimalnum == '')
return chinesestr;
}
數字金額轉化為大寫金額
create or replace function fn getmoneytochina p money in number return varchar2 is 功能 數字金額轉化為漢字金額 最大支援金額 9999999999999999.99 支援千萬億的任何金額 小數點支援2位 type m...
js轉化數字金額為大寫金額
js轉化數字金額為大寫金額 為了不想匯入jq檔案,現在使用原js。1 html 預估金額 金額大寫 2.js function sendnummoney var p1 0 9 d if p.test money p1.test money arabiaconverttochinese money 數...
數字金額轉為大寫金額
金額轉大寫 public class moneyconvertchinese string strlower null string strupart null string strupper null int itemp 0 保留兩位小數 123.489 123.49 123.4 123.4 lo...