|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
\\\'下面的函数将实现任意改变计数器位数,你要做的预备工作是: \\\'1、999_count.txt建立一个文本文件,并把初始值设为0。 \\\'2、预备一组数字图片放在gif目录下 Function GCounter(CounterLen)\\\'CounterLen是计数器的位数 CountFile=Server.MapPath("999_count.txt") Set FileObject=Server.CreateObject("Scripting.FileSystemObject") Set Out=FileObject.OpenTextFile(CountFile,1,FALSE,FALSE) counter=Out.ReadLine\\\'读取\\\'999_count.txt里面的计数值 Out.Close Set FileObject=Server.CreateObject("Scripting.FileSystemObject") Set Out=FileObject.CreateTextFile(CountFile,TRUE,FALSE) Application.lock counter=counter+1\\\'累计加1 Out.WriteLine(counter) Application.unlock Out.Close Dim S, i, G ,n S = CStr( counter ) if Len(s)<CounterLen then For n = 1 to CounterLen-len(s) G = G&"<IMG SRC=gif/0.gif>" Next End if For i = 1 to Len(S) G = G & "<IMG SRC=gif/" & Mid(S, i, 1) & ".gif>" Next response.write G End Function 返回类别: 教程 上一教程: 将指定的ASP文件内容生成HTML文件 下一教程: ASP和SQL结合处理时间小解 您可以阅读与"一个实现任意改变计数器位数的函数"相关的教程: · 计算当前日期是任意时间段内第几周的函数 · 一个求最大值与最小值的函数 · 一个生成随机密码的函数 · asp中的一个希奇的函数 · 检测整数和长整数的函数 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |