ASP 写的判断 Money 各个位值的函数
来源:CSDN 时间:2008-04-13 06:36:00
Function Moneynm(n,m)
checkPoint = InstrRev(n,".")
If n>9999.99 Then
Response.write"数据超过限制,请确定您的报销金额在9999.99元以内!"
Else
If (checkPoint <> 0) Then
leftNum = Mid(n,1,checkPoint-1)
rightNum = Mid(n,checkPoint+1,Len(n))
Else
leftNum = n
End If
gw = Mid(leftNum,Len(leftNum),Len(leftNum))
sw = 0
bw = 0
qw = 0
jw = 0
fw = 0
If Len(leftNum)>1 Then
sw = Mid(leftNum,Len(leftNum)-1,1)
End If
If Len(leftNum)>2 Then
bw = Mid(leftNum,Len(leftNum)-2,1)
End If
If Len(leftNum)>3 Then
qw = Mid(leftNum,Len(leftNum)-3,1)
End If
If Len(rightNum)>0 Then
jw = Mid(rightNum,1,1)
End If
If Len(rightNum)>1 Then
fw = Mid(rightNum,2,1)
End If
Select case m
case "gw"
Response.Write gw
case "sw"
Response.Write sw
case "bw"
Response.Write bw
case "qw"
Response.Write qw
case "jw"
Response.Write jw
case "fw"
Response.Write fw
End Select
End If
End Function
标签:函数,判断,asp
0
投稿
猜你喜欢
sql添加数据后返回受影响行数据
2011-11-03 17:18:18
oracle 发送邮件 实现方法
2009-06-10 17:49:00
新Orcas语言特性:扩展方法
2007-09-23 12:49:00
大家都对vertical-align的各说各话
2008-06-19 12:11:00
ASP中使用SQL语句教程
2008-09-03 12:17:00
我的栅格系统实现
2008-09-21 13:50:00
如何用Response.Write调用代替内嵌表达式?
2010-06-13 14:33:00
使用mysqli完成事务处理
2011-03-29 15:49:00
asp单主键高效通用分页存储过程
2009-02-23 19:21:00
Windows Server 2003 服务器安全设置--防火墙篇
2010-07-22 22:45:00
如何从ASP连接到Oracle Server?
2009-11-15 19:52:00
SQL Server Bulk Insert 只需要部分字段时的方法
2011-10-24 19:44:49
详细讲解如何删除Access数据库中的空记录
2008-11-28 14:58:00
Oracle 数据库操作技巧集
2010-07-26 12:49:00
MySQL数据库优化经验详谈
2009-12-15 10:34:00
WorkBench管理操作MySQL
2010-10-14 14:21:00
Web内容写作:得到更好稿件的头15条规则[译]
2011-06-09 14:38:00
新Orcas语言特性-查询句法
2010-07-16 12:58:00
巧用XSL和ASP在线编辑XML文档
2008-10-25 14:54:00
HTML 5 预览
2008-01-24 12:17:00