阿拉伯数字转中文大写用JS怎么转?
在网上只找到这个
但我转不来。。
<%
int count=0;
int i_index;
String cashnum= "13528.26 ";
String cashup= " ";
aaa class1 = new aaa();
for (int i =0;i < cashnum.length();i++)
{
if (cashnum.substring(i,i+1).compareTo( ". ")==0)
{
i_index=cashnum.lastIndexOf( ". ");
String num1=cashnum.substring(0,i_index);
cashup=class1.change(num1);
String num2=cashnum.substring(i_index+1);
if (num2.length()==1) num2=num2+ "0 ";
cashup=cashup+class1.change2(num2);
break;
}
else
count=count+1;
}
if (count==cashnum.length())
cashup=class1.change(cashnum)+ "整 ";
out.println(cashup);
%>
<%!
public class aaa{
String[] subdw={ "圆 ", "拾 ", "佰 ", "仟 ", "万 "};
String[] subdw2={ "分 ", "角 "};
String[][] subup={{ "0 ", "零 "},{ "1 ", "壹 "},{ "2 ", "贰 "},{ "3 ", "叁 "},{ "4 ", "肆 "},{ "5 ", "伍 "},{ "6 ", "陆 "},{ "7 ", "柒 "},{ "8 ", "捌 "},{ "9 ", "玖 "}};
public String change(String str)
{