程序员

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

作者:admin 2021-04-11 我要评论

如何防止计数器刷新计数? html head title 千花飞舞之真实的计数器 /title /head body %dim tms,counter,countlen dim images(20) h1="p 千花飞舞计数器 /font/...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

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

<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]


本文转载自网络,原文链接:https://m.jb51.net/article/4760.htm

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • 四两拨千斤——你不知道的VScode编码Ty

    四两拨千斤——你不知道的VScode编码Ty

  • 我是如何在 Vue 项目中做代码分割的

    我是如何在 Vue 项目中做代码分割的

  • position:sticky 粘性定位的几种巧妙应

    position:sticky 粘性定位的几种巧妙应

  • 从零到一搭建React组件库

    从零到一搭建React组件库

腾讯云代理商
精彩导读
海外云服务器
热门资讯
腾讯云代理商