日期:2010-09-04  浏览次数:21001 次

 ************************调用*********************
  '* <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=http://www.webjx.com/htmldata/2006-04-25/count/0.gif' border=0>" '//计数器图片文件
  <%
  Next
  j=0
  For i=(max-len(s)) to max-1
   j=j+1
  %>
  javastr=javastr+"<img src='http://www.webjx.com/htmldata/2006-04-25/count/<%=mid(s,j,1)%>.gif' border=0>"
  <%
  Next
  Set fp=Nothing
  Set fso=Nothing
  javastr=javastr+"</div>"
  %>
  document.write(javastr)