静态页面中使用的一些动态

来源:互联网 发布:中国网络电视台手机版 编辑:程序博客网 时间:2024/04/30 21:07
<script type="text/javascript"><!--google_ad_client = "pub-4490194096475053";/* 内容页,300x250,第一屏 */google_ad_slot = "3685991503";google_ad_width = 300;google_ad_height = 250;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

访问次数,

在统计页面加入以下这个代码

<SCRIPT src="static_click.asp?articleid=<%=articleid%>"></SCRIPT >

对应的ASP文件为

<!-- #include file="inc/conn.asp" -->
<%

articleid=int(trim(request.querystring("articleid")))
sqlStr="update product set hits=hits+1 where articleid=" & articleid
'给文章点击数加1
conn.execute(sqlStr)
'读出文章点击数
hits=conn.execute("select hits from product where articleid=" & articleid)(0)
Response.Redirect productshow&"_"&articleid&.htm
%>

document.write(<%=hits%>) 
---------------------------------------------- 

原创粉丝点击