最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp实现静态页面浏览次数统计代码
时间:2010-11-30 编辑:简简单单 来源:一聚教程网
在静态的html页面中要实现文章浏览次数的统计,可以进行js来调用asp教程文件带参数来实现,下面是我写的一款asp实现静态页面点击次数的代码。
<%
dim conn,connstr,rs
connstr = "provider=microsoft.jet.oledb.4.0;data source=" & server.mappath(dbdns & syssitedbpath)call openconn()
set rs = server.createobject("adodb.recordset")
private sub closeconn()
conn.close
set conn = nothing
end subprivate sub openconn()
set conn = server.createobject("adodb.connection")
conn.open connstr
end subid = cdbl(request.querystring("id"))
sql="select id,hits from ok3w_article where id=" & id
rs.open sql,conn,1,3
rs("hits") = rs("hits") + 1
rs.update
hits = rs("hits")
rs.closeset rs = nothing
call closeconn()
%>
在html中调用方法
其它的文章id是你在生成静态页面时给的
注明:本站原创教程,转载注明来源于http://www.111com.net/asp/asp.html
-
上一个: asp XMLHTTP备案信息查询程序
-
下一个: asp 分页实现代码
相关文章
- asp 静态页面实现方法 09-09
- 以前收集的一些资料---(一种新思路)使用一个“静态”的ASP页面来改进你的服务器的性能 01-12
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16