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
投稿
猜你喜欢
javascript实现json页面分页实例代码
2024-02-25 09:38:56
vue圆环百分比进度条组件功能的实现
2024-06-07 15:19:57
python数据可视化Seaborn绘制山脊图
2023-12-22 09:04:17
Django代码性能优化与Pycharm Profile使用详解
2022-06-28 21:13:06
详解Python 调用C# dll库最简方法
2022-05-22 00:20:09
基于java线程池读取单个SQL数据库表
2024-01-25 08:17:00
Python/JS实现常见加密算法的示例代码
2023-01-25 08:17:29
golang图片处理库image基本操作
2024-04-26 17:32:04
详解微信小程序「渲染层网络层错误」的解决方法
2024-04-22 13:01:23
asp如何获知文件最后的修改日期和时间?
2009-11-24 20:49:00
Python文件的压缩与解压
2023-09-01 08:17:23
利用Python制作一个MOOC公开课下载器
2022-03-13 19:46:17
在JavaScript中处理字符串之link()方法的使用
2024-06-07 15:55:06
python办公之python编辑word
2022-03-31 08:48:40
Sql Server中常用的6个自定义函数分享
2024-01-17 05:05:40
python自动化测试无法启动谷歌浏览器问题
2021-01-08 21:35:54
python机器学习之决策树分类详解
2023-04-28 14:31:05
解决python-redis-lock分布式锁的问题
2023-05-23 18:57:49
仿微博字符限制效果实现代码
2024-04-28 09:51:18
Python利用cv2动态绘制圆和矩形的示例详解
2022-08-20 08:23:15