ASP長(zhǎng)數(shù)字用逗號(hào)隔開顯示實(shí)例代碼_ASP教程
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!
推薦:ASP制作登陸頁(yè)面驗(yàn)證程序用戶登錄驗(yàn)證腳本,Chkpwd.asp % '=======用戶登錄驗(yàn)證腳本======= '如果尚未定義Passed對(duì)象,則將其定義為false,表示沒有通過(guò)驗(yàn)證 If IsEmpty(Session(Passed)) Then Session(Passed)=false End If 'Session(Passed)=False,表示尚未通過(guò)驗(yàn)證,則開始讀取
- <%
- Function Comma(str)
- If Not(IsNumeric(str)) Or str = 0 Then
- Result = 0
- ElseIf Len(Fix(str)) < 4 Then
- Result = str
- Else
- Pos = Instr(1,str,".")
- If Pos > 0 Then
- Dec = Mid(str,Pos)
- End if
- Res = StrReverse(Fix(str))
- LoopCount = 1
- While LoopCount <= Len(Res)
- TempResultTempResult = TempResult + Mid(Res,LoopCount,3)
- LoopCountLoopCount = LoopCount + 3
- If LoopCount <= Len(Res) Then
- TempResultTempResult = TempResult + ","
- End If
- Wend
- Result = StrReverse(TempResult) + Dec
- End If
- Comma = Result
- End Function
- %>
- <html>
- <body>
- <%
- aLongNumber = "12345678"
- %>
- 原來(lái)的數(shù)字: <%=aLongNumber%><br>
- 分隔后來(lái)的數(shù)字: <%=Comma(aLongNumber)%>
- </body>
- </html>
分享:ADO初學(xué)者教程:ADO 顯示顯示來(lái)自記錄集中的數(shù)據(jù)的最常用的方法,就是把數(shù)據(jù)顯示在HTML表格中。 顯示字段名稱和字段值 我們有一個(gè)名為Northwind的數(shù)據(jù)庫(kù),并且我們希望顯示出Customers表中的數(shù)據(jù)(記得以.asp為擴(kuò)展名來(lái)保存這個(gè)文件): htmlbody%set conn=Server.CreateObject(
相關(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長(zhǎng)數(shù)字用逗號(hào)隔開顯示實(shí)例代碼
。