<code id="qf3hh"></code>
  • <menuitem id="qf3hh"></menuitem>
  • <strike id="qf3hh"><label id="qf3hh"></label></strike>

  • ?
      開發(fā)技術(shù) / Technology

      js金額轉(zhuǎn)換大寫

      日期:2015年5月12日  作者:zhjw  來源:互聯(lián)網(wǎng)    點擊:1152

      Js代碼  
      1. var DX = function (num) {  
      2.   var strOutput = "";  
      3.   var strUnit = '仟佰拾億仟佰拾萬仟佰拾元角分';  
      4.   num += "00";  
      5.   var intPos = num.indexOf('.');  
      6.   if (intPos >= 0)  
      7.     num = num.substring(0, intPos) + num.substr(intPos + 1, 2);  
      8.   strUnit = strUnit.substr(strUnit.length - num.length);  
      9.   for (var i=0; i < num.length; i++)  
      10.     strOutput += '零壹貳叁肆伍陸柒捌玖'.substr(num.substr(i,1),1) + strUnit.substr(i,1);  
      11.     return strOutput.replace(/零角零分$/, '整').replace(/零[仟佰拾]/g, '零').replace(/零{2,}/g, '零').replace(/零([億|萬])/g, '$1').replace(/零+元/, '元').replace(/億零{0,3}萬/, '億').replace(/^元/, "零元");  
      12. };  

      国产一级婬片AAA毛,无码中文精品视视在线观看,欧美日韩a人成v在线动漫,五月丁香青草久久
      <code id="qf3hh"></code>
    • <menuitem id="qf3hh"></menuitem>
    • <strike id="qf3hh"><label id="qf3hh"></label></strike>