手揣网教程:绿色安全纯净官方版,体验当今速度最快的浏览器!

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

时间:2024/12/11作者:未知来源:手揣网教程人气:

[摘要]Function Moneynm(n,m) checkPoint = InstrRev(n,".") If n>9999.99 Then Resp...
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 写的判断 Money 各个位值的函数




Copyright © 2012-2018 手揣网教程(http://www.shouchuai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版