'我们的访问量一般存在数据库或文件中,但存放时都是以数字的形式存放的,显示时却喜欢做成图形的样式显示。
'ToImgCounter 将计数器数值转换成图形样式
'cnt 访问量
'counterLen 计数器样式的最小位数
function ToImgCounter(cnt, counterLen)
dim str, i, c
str = CStr(cnt)
'补零
for i=Len(str)+1 to counterLen
response.Write("<img src=""images/counter/0.gif"" alt=""0"">")
next
'显示真实记数
for i=1 to Len(str)
c = Mid(str, i, 1)
response.Write("<img src=""images/counter/" & c & ".gif"" alt=""" & c & """>")
next
end function
下载 11 种图形计数器样式:计数器.rar