当前位置: 首页 > 学习 > 电脑学习 > 网站开发 > ASP > ASP技巧 > 正文

asp:要问人民币小写转换为大写的朋友请来这里看源代码。简洁!!!

http://www.zk168.com.cn  招考学习网 2006-4-30 14:16:56
-----------------------------------------------------------[交流]-[打印]-[发送]-[收藏]--
<%
'****人民币大小写转换格式****
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>
-----------------------------------------------------------[交流]-[打印]-[发送]-[收藏]--
最新入库:
 
·10. 结束电话
·9 电话故障
·8. 分机、占线
·7. 打错电话
·6. 长途电话
·5. 转告消息
·4. 留 言
·3. 等候与回电
·2. 没找到人
·1. 打电话 接电话
相关内容:
 
·Wake-up Call Service 唤醒服务
·At the Barbers 在理发店与美容厅
·Maintenance 维修服务
·Settling complaints 处理投诉
·Laundry Service 洗衣服务
·At the Information Desk问讯处 2
·At the Information Desk问讯处 1
·The Bellman 应接服务员
·At the Reception Desk在接待处 2
·At the Reception Desk在接待处 1
网友点评:
 
会员名称:
密码:匿名 ·注册·忘记密码?
评论内容:
(最多300个字符)
  查看评论
友情提醒:
 1.库中的资料大都来自互联网、网友上传、各类书籍,在录入的过程中难免会出现错误,恳请网
 友来信指正!
 2.如果网友在本库中未能找到所需要的材料,请登陆到我们的论坛《招考学习网》版块!
 3.考友想加入招考学习网的编辑部,请发信到XueXiWang#Gmail.com(#改为@)附带个人简历
 4.如需转载请注明出处及作者,谢谢合作!
 5.如果您有更好的建议或意见请EMAIL:XueXiWang#Gmail.com (#改为@)
 6.凡标题中有注有“[NO]”字样均不含答案且答案整理中.
 7.如本库中转载文章涉及版权等问题,请相关网站或作者在两周内发邮件通知(EMAIL:  XueXiWang#Gmail.com (#改为@))我们,我们接到通知后立即删除该文章及链接!
你问我答 更多>>