欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

 更新時間:2006年11月16日 00:00: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>

相關文章

最新評論