欢迎光临
我们一直在努力

今天做了一个ASP计数器,放出源码吧,挺简单的!-ASP教程,ASP应用

建站超值云服务器,限时71元/月

前天在johnny的专栏看到一个计数器,忽然想起以前我也做过~~今天就翻出来改了一下嵌入到我的blog中了~~放在别人的服务器上~~放出源码大家有用得着的看看吧~~如果不喜欢用图片的就改成文字得了!图片文件大家可以自己找点好看的放上!

************************调用*********************

* <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)

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 今天做了一个ASP计数器,放出源码吧,挺简单的!-ASP教程,ASP应用
分享到: 更多 (0)

相关推荐

  • 暂无文章