asp貨幣大寫轉(zhuǎn)換函數(shù)(2)_ASP教程
教程Tag:暫無(wú)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ù)值需要擴(kuò)大,那么需改動(dòng)以下表達(dá)式 I 的值。
If I = J - 10 Then
Ch2 = "億"
ElseIf I = J - 6 Then
If nZero <> 0 Then
Ch2 = "萬(wàn)"
' 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, "零萬(wàn)", "萬(wàn)")
AtoC = Replace(AtoC, "零億", "億")
AtoC = Replace(AtoC, "零整", "整")
分享:ASP編程中15個(gè)非常有用的例子(二)8.強(qiáng)迫輸入密碼對(duì)話框 答把這句話放載頁(yè)面的開(kāi)頭 % response.status=401 not Authorized response.end % 9 如何傳遞變量從一頁(yè)到另一頁(yè) 答 用HIDDEN類型來(lái)傳遞變量 % form method=post action=mynextpage.asp % for each item in request.form % input
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫(kù)實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過(guò)濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁(yè)模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無(wú)組件分頁(yè)實(shí)現(xiàn)思路及代碼
- 相關(guān)鏈接:
- 教程說(shuō)明:
ASP教程-asp貨幣大寫轉(zhuǎn)換函數(shù)(2)
。