asp貨幣大寫轉(zhuǎn)換函數(shù)(2)_ASP教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      推薦:怎樣限制只能中文輸入的方法。
      function isCharsInBag (s, bag) { var i,c; for (i = 0; i s.length; i++) { c = s.charAt(i);//字符串s中的字符 if (bag.indexOf(c) -1) return c; } return ; } 檢查函數(shù): function ischinese(s) { var errorChar; var badChar = ABCDEFGHIJKLMNOPQRST


                  If nZero <> 0 Or I = J - 9 Or I = J - 5 Or I = J - 1 Then
                      If Right(AtoC, 1) = "零" Then AtoC = Left(AtoC, Len(AtoC) - 1)
                      Ch1 = "零"
                  Else
                      Ch1 = ""
                  End If
                             
                  '如果轉(zhuǎn)換的數(shù)值需要擴大,那么需改動以下表達式 I 的值。
                  If I = J - 10 Then
                      Ch2 = "億"
                  ElseIf I = J - 6 Then
                      If nZero <> 0 Then
                          Ch2 = "萬"
      '                    nZero = 0
                      End If
                  ElseIf I = J - 2 Then
                      Ch2 = "元"
                   ElseIf I = J Then
                      Ch2 = "整"
                  Else
                      Ch2 = ""
                  End If
                  nZero = 0
              End If
             
              AtoC = AtoC & Ch1 & Ch2
          Next I
         
          '最后將多余的零去掉
              AtoC = Replace(AtoC, "零元", "元")
              AtoC = Replace(AtoC, "零萬", "萬")
              AtoC = Replace(AtoC, "零億", "億")
              AtoC = Replace(AtoC, "零整", "整")
          

      分享:ASP編程中15個非常有用的例子(二)
      8.強迫輸入密碼對話框 答把這句話放載頁面的開頭 % response.status=401 not Authorized response.end % 9 如何傳遞變量從一頁到另一頁 答 用HIDDEN類型來傳遞變量 % form method=post action=mynextpage.asp % for each item in request.form % input

      共2頁上一頁12下一頁
      來源:模板無憂//所屬分類:ASP教程/更新時間:2010-04-13
      相關(guān)ASP教程