当前位置: 代码网 > it编程>编程语言>其他编程 > 如何防止计数器刷新计数?

如何防止计数器刷新计数?

2024年05月18日 其他编程 我要评论
如何防止计数器刷新计数?<html><head><title>千花飞舞之真实的计数器</title></head><body>&

如何防止计数器刷新计数?

<html>
<head>
<title>
千花飞舞之真实的计数器</title>

</head>
<body>
<%dim tms,counter,countlen
dim images(20)
h1="<p>
千花飞舞计数器</font></p>"
if isempty(session("hasbeenconnected")) then
set rs=server.createobject("adodb.recordset")
application.lock
rs.open "update aspcount set countss=countss+1","dsn=userdbs",3,3
application.unlock
session("hasbeenconnected")=true
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from aspcount","dsn=userdbs",3,3
rs.movefirst
counter=rs(0)
countlen=len(counter)
tms="<h1><font color='#8000ff'>
欢迎,您是第</font>"&&counter&&"<font color='#8000ff'>位来访者!</font></h1>"
response.write(tms)
for i=1 to countlen
images(i)="<img src=" && mid(counter,i,1) && ".gif></img>"
next
response.write images(1)&&images(2)&&images(3)&&images(4)&&images(5)&&images(6)&&images(7)
rs.close
%>
</body></html>

 

[1]

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com