国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 編程設計 > 正文

如何把一長串數字分位顯示?

2020-06-19 13:52:00
字體:
來源:轉載
供稿:網友

<%
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)
  TempResult = TempResult + Mid(Res,LoopCount,3)
  LoopCount = LoopCount + 3
  If LoopCount <= Len(Res) Then
  TempResult = TempResult + ","
  End If
  Wend
  Result = StrReverse(TempResult) + Dec
End If
Comma = Result
End Function
%>
<html>
<body>
<%
aLongNumber = "12345678"
%>
原來的數字: <%=aLongNumber%><br>
用逗號格式化后: <%=Comma(aLongNumber)%>
</body></html>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 龙岩市| 南木林县| 申扎县| 密山市| 白城市| 伽师县| 丹江口市| 青冈县| 兴义市| 奎屯市| 玉屏| 日喀则市| 巴林右旗| 时尚| 沅江市| 林州市| 吴桥县| 德江县| 鄂伦春自治旗| 铜陵市| 马尔康县| 普宁市| 永清县| 太湖县| 遂平县| 沙田区| 满城县| 通河县| 饶河县| 肇东市| 东港市| 修水县| 河南省| 西平县| 卢氏县| 明溪县| 玉林市| 从江县| 嘉善县| 蓬安县| 高陵县|