<Body>
<Input type = "text" id = "TXT"/> <br/>
<Input type = "button" id = "SS" value = "Submit"/> <br/>
<Input type = "text" id = "result"/>
</Body>
<SCRIPT type = "text/JavaScript">
$ (Function (){
$ ("# SS"). Click (function (){
VaR S = change ($ ("# TXT"). Val ());
$ ("# Result"). Val (s );
})
})
Function Change (STR ){
Je = "zookeeper ";
CDW = "tens of thousands of yuan, hundreds of millions of yuan, and tens of thousands of yuan ";
VaR newstring = (Str * 100). tostring ();
VaR newstringlog = newstring. length;
Newdw = CDW. substr (CDW. Length-newstringlog );
VaR num0 = 0;
VaR WAN = 0;
VaR dxje = "";
For (var m = 1; m <(newstringlog + 1); m ++ ){
VaR xzf = newstring. substr (m-1, 1 );
VaR dzf = je. substr (xzf, 1 );
VaR DW = newdw. substr (m-1, 1 );
If (dzf = "0 "){
Dzf = "";
WAN = 1;
If (DW = ""){}
Else if (DW = "Ten Thousand "){
Dzf = "";
WAN = 1;
} Else if (DW = ""){}
Else {DW = "";}
Num0 = num0 + 1;
} Else {
If (num0-wan> 0 ){
If (DW! = ""){
Dzf = "zero" + dzf;
}
}
Num0 = 0;
}
Dxje = dxje + dzf + dw;
}
If (newstring. length! = 1 ){
If (newstring. substr (newstring. Length-2) = "00 "){
Dxje = dxje + "whole ";
} Else {
Dxje = dxje;
}
}
Return dxje;
}
</SCRIPT>