最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
计数器(数据库存储)
时间:2022-06-30 10:37:18 编辑:袖梨 来源:一聚教程网
<%
//Program Name:Counter
//Author:magicfox
//Time:10/14/2004
function setCount()
{
var sql,DataSet;
var DataSet;
var err=new Error();
var result;
DataSet=Server.CreateObject("Adodb.recordset");
sql="select count from counter";
DataSet.Open(sql,DataConn,1,1);
if (err.number!=0)
{
}
else
{
result=DataSet("count").value;
DataSet.close;
sql="update counter set count=count+1";
DataConn.Execute(sql);
}
return(result);
}
function showCount(Num)
{
var j,i,Num;
var tmp=new String();
tmp=Num.toString();
j=tmp.length;
i=1;
Response.Write("您是本站第");
while (i<=(8-j))
{
Response.Write("0");
i=i+1;
}
Response.Write(Num+"位来访问者");
}
function Counter()
{
this.count=0;
this.setCount=setCount;
this.showCount=showCount;
}
%>
//Program Name:Counter
//Author:magicfox
//Time:10/14/2004
function setCount()
{
var sql,DataSet;
var DataSet;
var err=new Error();
var result;
DataSet=Server.CreateObject("Adodb.recordset");
sql="select count from counter";
DataSet.Open(sql,DataConn,1,1);
if (err.number!=0)
{
}
else
{
result=DataSet("count").value;
DataSet.close;
sql="update counter set count=count+1";
DataConn.Execute(sql);
}
return(result);
}
function showCount(Num)
{
var j,i,Num;
var tmp=new String();
tmp=Num.toString();
j=tmp.length;
i=1;
Response.Write("您是本站第");
while (i<=(8-j))
{
Response.Write("0");
i=i+1;
}
Response.Write(Num+"位来访问者");
}
function Counter()
{
this.count=0;
this.setCount=setCount;
this.showCount=showCount;
}
%>
相关文章
- 《彩色点点战争》推图常用三大主c玩法详解 01-23
- 《燕云十六声》池鱼林木任务攻略 01-23
- 《大连地铁e出行》查看行程记录方法 01-23
- 《明日方舟》2025春节限定干员余角色介绍 01-23
- 《崩坏:星穹铁道》万敌光锥搭配攻略 01-23
- 《燕云十六声》一药千金任务攻略 01-23