Digital transfer money uppercase

xiaoxiao2021-03-05  20

Function Changetobig (Value) {Var Intfen, I; Var Strarr, Strnum, Strbig, Strnow

If (value) == "" // data returns "zero" Return "zero" 非 (isnan) // data illegal prompt, return to the air string {strerr = "data" Value "illegal!" Alert (strerr);} strCheck = value "; strCheck = strCheck.split (". "); strCheck = strarr [0]; if (strCheck.length> 12) / / Data is greater than or equal to 1 trillion, prompts to handle {strerr = "data" value "excessively, unable to handle!" Alert (strr); return ";} try {i = 0; strbig ="; intfen = Value * 100; // Convert to the value of the unit strfen = intfen.tostring (); strarr = strfen.split ("."); strfen = strarr [0]; intfen = strfen.length; // Get the length strarr = strfen.split ("); // Decompose each value into the While (INTFEN! = 0) // Decomposition and conversion {i = i 1; switch (i) // selection unit {casse 1: STRDW = "points"; Break; case 2: strdw = "angle"; Break; CA SE 3: STRDW = "Yuan"; Break; Case 4: strdw = "Pick up"; Break; Case 5: strdw = "佰"; Break; Case 6: strdw = "仟"; Break; Case 7: strdw = " Wan "; Break; Case 8: strdw =" Pick up "; Break; Case 9: strdw =" "; Break; Case 10: strDw =" 仟 "; Break; Case 11: strdw ="

"Break; Case 12: strdw =" Pick up "; Break; Case 13: strdw =" "; Break; Case 14: strdw =" 仟 "; Break;} switch (strarr [intfen-1]) // Select Number {CASE "1": Strnum = "壹"; Break; Case "2": Strnum = ""; Break; Case "3": strnum = "叁"; Break; Case "4": strnum = " "" Break; Case "5": strnum = "Wu"; Break; Case "6": strnum = "Lu"; Break; Case "7": strnum = "柒"; break; casse "8": strnum = "捌"; Break; Case "9": strnum = "玖"; Break; Case "0": strnum = "zero"; Break;}

// Test a special case strnow = strbig.split (""); // Divided into zero-when IF ((i == 1) && (strr [intfen-1] == "0")) Strbig = " "; 为 时 情况 e i ((i == 2) && (Strarr [INTFEN-1] ==" 0 "))) {// Amount for zero (strbig! = "Whole") strbig = "zero" strbig;} // yuan is zero case ELSE IF ((i == 3) && (strarr [intfEN-1] == "0")) Strbig = "Yuan" Strbig; // Pick up - 中 且 且 零 零 零 零 零 零 零 零 零 零 零 (((i i)-) 补 ((i <7) && (i> 3) && (Strarr [intfen-1) ] == "0") && (STRNOW [0]! = "Zero") && (Strnow [0]! = "Yuan")) Strbig = "zero" strbig; // Pick up - 中 中 位And the previous one (element or more) is also zero, crossing ELSE IF ((i <7) && (I> 3) && (Strarr [INTFEN-1] == "0") && (STRNOW [0 ] == "zero")) {} // Pick up - 中 中 且 且 e i 过 跨 ELSE IF ((i <7) && (i> 3) && (i <7) && (i> 3) && (strarr [intfEN-1] == "0") && (Strnow [0] == "yuan")) {} // When 万 零 万 万Else IF ((i == 7) && (strr [intfEN-1] == "0")) Strbig = "10,000" strbig; // Pick up 10,000,000 in one bit of zero and the previous one ( Else IF ((i <11) && (I> 7) && (Strarr [intfEN-1] == "0") &&

(Strnow [0]! = "zero") && (Strnow [0]! = "10,000")) Strbig = "zero" strbig; // Pick up 10,000,000 in a zero and the previous one ( Hundreds of) also crossing Else IF ((i <11) && (i> 7) && (Strarr [INTFEN-1] == "10") && (StRNOW [0] == "10,000 )) {} // 拾 万 中 中 且 e i i i ((((((((((((((((((,, INTFEN-1] == "0") && (STRNOW [0] == "zero")) {} // million is zero and there is a position and more than 100,000, and ELSE IF is completed in 10,000 yuan. (i <11) && (i> 8) && (strn [INTFEN-1]! = "0") && (STRNOW [0] == "10,000") && (Strnow [2] == "仟")))) Strbig = strnum strdw "万 零" strbig.substring (1, strbig.Length); // separately handle ELSE if (i == 11) {/ / billion bits are zero and thousands of zero , Remove the rumor to zero IF ((strnow [intfEN-1] == "0") && (Strnow [0] == "10,000") && (Strnow [2] == "仟")) strbig = "100 million " " Zero " strbig.substring (1, strbig.Length); // billion is zero and there is no zero position, remove the else IF ((strarr [intfen-1] ==" 0 " ) && (strnow [0] == "10,000") && (Strnow [2]! = "仟"))) Strbig = "100 million" strbig.substring (1, strbig.length); // billion is not zero and full of zero position, go to QZE ELSE IF ((Strnow [0] == " ") && (strnow [2] ==" "

)) Strbig = Strnum strdw "zero" strbig.substring (1, strbig.Length); // billion is not zero and unpredictless, removes the else Else IF ((Strnow [0] = = "10,000") && (STRNOW [2]! = "仟")) Strbig = Strnum StrDW strbig.substring (1, strbig.Length); // Other normal conditions Else strbig = strnum strdw strbig;} // Pick up ELSE IF ((i <15) && (I> 11) && (Strarr [INTFEN-1) ] == "0") && (Strnow [0]! = "Zero") && (Strnow [0]! = "100 million") Strbig = "zero" strbig; // pick up billion - million yuan To zero and the previous one (i <15) && (i> 11) && (Strarr [INTFEN-1] == "0") && [0] == "" 100 million ")) {} // Pick up ELSE IF when the previous one is zero and the previous one is 100 million and zero ((i <15) && I> 11) && (strrr [intfEN-1] == "0") && (Strnow [0] == "zero")) {} // billion is zero and there is no tens of thousands and more than 10 billion times Remove the zero ELSE IF written for the last time ((i <15) && (I> 11) && (Strarr [INTFEN-1]! = "0") && (STRNO W [0] == "zero") && (Strnow [1] == "100 million) && (Strnow [3]! =" 仟 ")) Strbig = Strnum StrDW strbig.substring (1, strbig.length ); // billion is zero and there is 10 million and more than 10 billion times, and ELSE IF ((i <15) && (I> 11) && (Strarr [INTFEN-1]! = "0") &

转载请注明原文地址:https://www.9cbs.com/read-38916.html

New Post(0)