//JavaScript バージョンの人民元金額を大文字に変換するプログラム
//CopyRight Bardo QI - ['jiao','fen',''], 4:['qian','hundred','shi','']}; DUvar var capNum=['zero' ,'一','二' ','三','四','五','鲁','撒','八','玖'];
if ((num.toString( )).indexOf('.' ) > 16)||(isNaN(num)))
return '';
num = (Math.round(num*100)/100) ;
num =(( Math.pow(10,19-num.length)).toString()).substring(1) num;
var i,ret,j,nodeNum,k,subret,len ,subChr,CurChr=[];
for (i=0,ret='';i nodeNum=num. substring(j,j 4);
for(k=0,subret='',len=nodeNum.length;((k CurChr [k%2] = capNum[nodeNum.charAt(k)] ((nodeNum.charAt(k)==0)?'':capDigit[len][k]);
if (!((CurChr[ 0]==CurChr[1]) && (CurChr[0]==capNum[0])))
if(!((CurChr[k%2] == capNum[ 0]) && (subret== '') && (ret=='')))
subret = CurChr[k%2]
} }
subret = subret ((subret==' ')?'':capUnit[i ]);
if(!((subChr == capNum[0]) && (ret=='')))
ret = subChr; =(ret==' ')? capNum[0] capUnit[3]: ret;
戻り値