您的位置:首页 > 编程语言 > ASP

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

2007-08-22 09:39 267 查看
<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%>) 
---------------------------------------------- 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  asp file