http://hanhead.tistory.com/entry/formatBytes
<%
Function formatBytes(xspace)
If xspace < 1024 Then
formatBytes = xspace
ElseIf xspace >= 1024 And xspace < 1048576 Then
formatBytes = FormatNumber((xspace / 1024),2) & " K"
ElseIf xspace >= 1048576 And xspace < 1073741824 Then
formatBytes = FormatNumber((xspace / 1048576),2) & " M"
ElseIf xspace >= 1073741824 then
formatBytes = FormatNumber((xspace/1073741824),2) & "G"
End If
End Function
%>
Function formatBytes(xspace)
If xspace < 1024 Then
formatBytes = xspace
ElseIf xspace >= 1024 And xspace < 1048576 Then
formatBytes = FormatNumber((xspace / 1024),2) & " K"
ElseIf xspace >= 1048576 And xspace < 1073741824 Then
formatBytes = FormatNumber((xspace / 1048576),2) & " M"
ElseIf xspace >= 1073741824 then
formatBytes = FormatNumber((xspace/1073741824),2) & "G"
End If
End Function
%>
'asp' 카테고리의 다른 글
ajaxed v 1.0 (0) | 2010.08.24 |
---|---|
escape JSON function (0) | 2010.08.24 |
view source &asp coloring (0) | 2010.08.24 |
alert function in asp (0) | 2010.08.24 |
get new non repeated file name on a specific folder (0) | 2010.08.24 |