| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 414 人关注过本帖
标题:请问这段代码 如何将最后括号里面的数字 直接调用 <%=rs("ss")%>这个字段的 ...
取消只看楼主 加入收藏
dxf9119
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-3-7
结帖率:0
收藏
已结贴  问题点数:20 回复次数:0 
请问这段代码 如何将最后括号里面的数字 直接调用 <%=rs("ss")%>这个字段的数值信息
请问这段代码 如何将最后括号里面的数字 直接调用 <%=rs("ss")%>这个字段的数值信息,

<%
Function uMoney(money)
If Not IsNumeric(money) or money>9999999999999.99 Then
   uMoney="超出范围"
   Exit Function
else
uMoney="人民币"
end if
Dim numList : numList = array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖")
Dim rmbList : rmbList = array("元","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟","万")
Dim rList : rList = array("零分","零角","零元","零拾","零佰","零仟","零万","零亿")
Dim tList : tList = array("整","零","元","零","零","零","万","亿")
money = cStr(FormatNumber(money,2,0,0,0))
Dim moneyArr : moneyArr = split(money,".")
Dim mLen : mLen = len(moneyArr(0))
Dim i,n
for i=1 to mLen
   n = int(Mid(moneyArr(0),i,1))
   uMoney = uMoney & numList(n) & rmbList(mLen-i)
next
uMoney = uMoney & numList(left(moneyArr(1),1)) & "角" & numList(right(moneyArr(1),1)) & "分"
for i=0 to ubound(rList)
   uMoney = replace(uMoney,rList(i),tList(i))
next
while instr(uMoney,"零零")<>0
    uMoney = replace(uMoney,"零零","零")
wend
uMoney = Replace(uMoney, "零亿", "亿")
uMoney = Replace(uMoney, "零万", "万")
uMoney = Replace(uMoney, "亿万", "亿")
uMoney = Replace(uMoney, "零元", "元")
uMoney = Replace(uMoney, "零整", "整")
End Function
%>
<%
response.write uMoney(907000.00)
%>

搜索更多相关主题的帖子: 数字 信息 人民币 money 如何 
2012-03-07 15:43
快速回复:请问这段代码 如何将最后括号里面的数字 直接调用 <%=rs("ss")%>这个字 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.034878 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved