如何防止計(jì)數(shù)器刷新計(jì)數(shù)?
如何防止計(jì)數(shù)器刷新計(jì)數(shù)?
<html>
<head>
<title>千花飛舞之真實(shí)的計(jì)數(shù)器</title>
</head>
<body>
<%dim tms,counter,countlen
dim images(20)
h1="<p> 千花飛舞計(jì)數(shù)器</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'>位來(lái)訪者!</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]
相關(guān)文章
如何把一個(gè)Excel文件放到ASP頁(yè)面中去?
如何把一個(gè)Excel文件放到ASP頁(yè)面中去?...2006-11-11如何編寫(xiě)高質(zhì)量的前端代碼(快手電商前端前端代碼規(guī)范)
這篇文章主要介紹了如何編寫(xiě)高質(zhì)量的前端代碼,這篇規(guī)范寫(xiě)的不錯(cuò)!需要的朋友可以參考下2024-02-02如何把URL和郵件地址轉(zhuǎn)換為超級(jí)鏈接?
如何把URL和郵件地址轉(zhuǎn)換為超級(jí)鏈接?...2006-11-11如何計(jì)算出當(dāng)前日期屬于定義時(shí)間段內(nèi)的第幾星期?
如何計(jì)算出當(dāng)前日期屬于定義時(shí)間段內(nèi)的第幾星期?...2006-11-11如何編制一個(gè)產(chǎn)生隨機(jī)密碼的函數(shù)?
如何編制一個(gè)產(chǎn)生隨機(jī)密碼的函數(shù)?...2006-11-11