首页 > 学院 > 编程设计 > 正文

如何做一个计数器并让人家申请使用?

2020-06-19 13:49:44
字体:
来源:转载
供稿:网友

第一步,创建一个计数器(最简单的数字计数器,不是图片式的):

<% @language="vbscript" %> 

<% 

set fsFilesys=CreateObject("Scripting.FileSystemObject")

set myText=fsFilesys.OpenTextFile(Server.MapPath("/count")&"/count.txt")count=myText.ReadLine

' 读存储在count.txt的计数值,可先写上8771990.

my Text.close

count=count+1 

set myText=fsFilesys.CreateTextFile(Server.MapPath("/count")&"/count.txt")

' 重写计数值.

myText.WriteLine(count) 

myText.close 

response.write "document.write('<%=count%>')" 

%> 

' 向客户端发送数字.

 

第二步,用以下语句提供申请:

<script language="javascript1.1" src="http://flashdays.126.com/count/count.asp">  

 

[1]

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表