|
|
 |
|
|
| ASP计数器 |
|
************************调用********************* '* <script language="javascript" src="xxx.asp?max=8"></script> '*************************************************
javastr="<div algin='center'>" <% max=Request("max") '//计数器位数 If Request.cookies("count")="" Then '//防刷 Set fso=Server.CreateObject("Scripting.FileSystemObject") Set fp=fso.OpenTextFile(Server.MapPath("count.dat")) '//计数器统计文件 countn=fp.Readline countn=countn+1 Fp.close Set fp=Nothing set fp=fso.createtextfile(server.mappath("count.dat")) fp.Writeline countn set fp=nothing set fso=nothing Response.Cookies("count")=countn End If Set fso=Server.CreateObject("Scripting.FileSystemObject") Set fp=fso.OpenTextFile(Server.MapPath("count.dat")) s=fp.Readline For n=(max-len(s)) to 1 step -1 %> javastr=javastr+"<img src=count/0.gif' border=0>" '//计数器图片文件 <% Next j=0 For i=(max-len(s)) to max-1 j=j+1 %> javastr=javastr+"<img src='count/<%=mid(s,j,1)%>.gif' border=0>" <% Next Set fp=Nothing Set fso=Nothing javastr=javastr+"</div>" %> document.write(javastr)
|
| |
|
上一篇教程: 用ASP和SQL实现基于Web的事件日历 下一篇教程: 用ASP的安全验证来对windows 2000的管理者密码进行在线修改 |
|
|
 |
|
|
|
 |
我们的专业服务: |
 |
|
 |
乌鲁木齐网站建设、新疆网站建设、乌鲁木齐网页设计、新疆网页设计、新疆网络公司、乌鲁木齐网络公司
乌鲁木齐网络推广、新疆网络推广、新疆网站推广 |
|
 |
|
|
|
|
|