时政 | 体育 | 文化 | 军事 | 社会 | 法制 | 人物 | 财经 | 科技 | 娱乐 | 女性 | 健康 | 教育 | 时尚 | 笑话 | 游戏 | 旅游 | 房产 | 汽车 | 福州 | 美食

ASP 写的判断 Money 各个位值的函数

字体大小:减小 增大作者:未知 来源:CSDN 发布时间:2006-4-13 6:36:00 发布人:runinfos
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



【声明】本网站刊载的新闻及评论由网友提供分享 内容纯属作者个人观点或转载,不表示巴牛生活网同意其说法或描述,仅为提供更多信息,也不构成任何建议。网友转载请注明原作者姓名及出处。如有侵犯到您的版权,请与我们联系

网友的评论

发布我的评论

用户名:
分 值:
100分 85分 70分 55分 40分 25分 10分 0分
[更多评论…]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 客户服务
Copyright © 2005-2006 515186.com . All Rights Reserved .
在线客服:在线客服 在线客服 在线客服
Powered by:福州软信网络科技有限公司
网站备案号:闽ICP备07021762号