JS Convert page lowercase amount to uppercase amount

Source: Internet
Author: User

function Changechinesenumber (num) {if (IsNaN (num) | | num > Math.pow (TEN)) return "" var cn = "0 One and three restaurants Woolu Qi Ba Jiu var unit = new Array ("Pick Baiqian", "split angle") var unit1= new Array ("trillion", "") var Numarray = Num.tostring (). Split ("." ) var start = new Array (numarray[0].length-1, 2) function Tochinese (num, index) {var num = num.re          Place (/\d/g, function ($) {return Cn.charat ($) +unit[index].charat (start--%4? start%4:-1) }) return num} for (var i=0; i<numarray.length; i++) {var tmp = ' "for          (Var j=0; j*4<numarray[i].length; J + +)          {var strindex = numarray[i].length-(j+1) var str = numarray[i].substring (strindex, strindex+4) var start = I? 2:str.length-1 var tmp1 = Tochinese (str, i) TMP1 = tmp1.replace (/(0.) +/g, "0"). Replace (/0 +$/, "") Tmp1 = Tmp1.replace (/^ one pick/, "pickup") TMP = (Tmp1+unit1[i].charat (j-1)) + tmp} Numarray[i] = tmp} numarray[1] = numarray[1]? NUMARRAY[1]: "numarray[0] = numarray[0]? numarray[0]+ "meta": numarray[0], numarray[1] = Numarray[1].replace (/^ 0 +/, "") numarray[1] = Numarray[1].match (/min/)?   NUMARRAY[1]: numarray[1]+ "whole" return numarray[0]+numarray[1]}

JS Convert page lowercase amount to uppercase amount

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.