欢迎光临
我们一直在努力

人民币小写转换为大写

建站超值云服务器,限时71元/月

<%

****人民币大小写转换格式****

dim str(9)

str(0)="零"

str(1)="壹"

str(2)="贰"

str(3)="叁"

str(4)="肆"

str(5)="伍"

str(6)="陆"

str(7)="柒"

str(8)="捌"

str(9)="玖"

aa=request.form("source")

hh=formatnumber(aa,2,-1)

aa=replace(hh,".","")

aa=replace(aa,",","")

for i=1 to len(aa)

s=mid(aa,i,1)

mynum=str(s)

select case(len(aa)+1-i)

case 1: k= mynum&"分"

case 2: k= mynum&"角"

case 3: k= mynum&"元"

case 4: k= mynum&"拾"

case 5: k= mynum&"佰"

case 6: k= mynum&"仟"

case 7: k= mynum&"万"

case 8: k= mynum&"拾"

case 9: k= mynum&"佰"

case 10: k= mynum&"仟"

end select

m=m&k

next

%>

<html>

<head>

<title>数字转换</title>

<meta http-equiv="content-type" content="text/html; charset=gb2312">

</head>

<!–

elseif(s=".") then

n=m

i=i+2

for j=i to len(aa)

s=mid(aa,i,1)

mynum=str(s)

select case(len(aa)+1-i)

case 1: p= mynum&"分"

case 2: p= mynum&"角"

end select

m=m&p

next

–>

<body bgcolor="#ffffff">

<form method="post" name="forma">

<input type="text" name="source" value="<%=hh%>">

=

<input type="text" name="result" value="<%=m%>" size="40">

<input type="submit" name="submit" value="提交 " >

</form>

</body>

</html>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 人民币小写转换为大写
分享到: 更多 (0)