求解?超难的问题!!80分奉送!不够可以另外再加。

sun94510451 2005-04-11 12:51:16
做一静态网页的新闻程序,如何统计点击率?我看过好多都是点某新闻超连接进入一个*.asp页(该页面用来记录点击率加一),然后再response.redirect到静态新闻页。在超连接直接连静态页面路径,点此连接的同时让对应该条新闻的点击率自动增加(不一定要显示在该条新闻页面上,存入数据库即可)?
...全文
155 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
你们都正确,我是路径搞错了,正解为:<script src="../counter.asp?id=news_id"><script>
哈哈,谢谢各位了!
cdown 2005-04-11
  • 打赏
  • 举报
回复
Frame
mzhmark 2005-04-11
  • 打赏
  • 举报
回复
用<script src="counter.asp?id=news_id"><script>这样肯定是可以的
以前很多的网站提供的流量分析都是这样做的。
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
up的人也没有了
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
这我知道的啊,静态页面好象不直接处理.asp文件/
madpolice 2005-04-11
  • 打赏
  • 举报
回复
News_id

这个在生成的时候得替换成具体的文章编号
gilbert007 2005-04-11
  • 打赏
  • 举报
回复
板凳:)
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
模板代码为:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>H_Title</title>
<style title=indexpage type=text/css>body {
font-size: 14px; line-height: 18px
}
ul {
font-size: 14px; line-height: 18px
}
ol {
font-size: 14px; line-height: 18px
}
td {
font-size:9pt
}
a:link {
color: #000000; text-decoration: none
}
a:visited {
color: #333333; text-decoration: none
}
a:active {
color: #666666; text-decoration: none
}
a:hover {
color: #ff6633; text-decoration: underline
}
a {
color: #000000; font-size: 9pt; text-decoration: none
}
p {
font-size: 9pt; line-height: 18px
}
.help {
cursor: help
}
</style>
</head>
<script src="count.asp?bianhao=News_id"></script>
<body>
<div id=moban style="display: none; position: absolute; left: 21; top: 1422; width: 680; height: 31">
<p style="margin-left: 5px;margin-top:7px; margin-bottom:6px">
::<a title=_quanming href=_lianjie target=_blank>_ming</a>
</p>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="754">
<tr>
<td width="100%"></td>
</tr>
</table>
<br>
<table width="754" border="0" cellpadding="0" cellspacing="0" height="1">
<tr>
<td width="198" height="143" valign="top">
<table border="0" width="100%" height="48">
<tr>
<td width="100%" height="44"></td>
</tr>
</table>
<div align="center">
<center>
<table border="1" width="86%" cellspacing="0" cellpadding="0" height="1" bordercolorlight="#D8F4C8" bordercolordark="#D8F4C8">
<tr>
<td width="100%" bordercolorlight="#EFF3FE" bordercolordark="#28AC00" bgcolor="#7AC97C" height="24">
<p align="center"><font color="#FFFFFF">:: <font size="2">新 闻 站 内 搜 索</font>
::</font></td>
</tr>
<tr>
<td width="100%" bordercolorlight="#28AC00" bordercolordark="#28AC00" height="110" bgcolor="#F3FCF1">
<div align="center">
<table border="1" width="163" cellpadding="0" height="85" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
<tr>
<td bgcolor="#F3FCF1" height="83" width="157" valign="top" bordercolorlight="#F3FCF1" bordercolordark="#F3FCF1">
<form name="search" method="POST" action="../index.asp" target="_blank">
<div align="center">
<p align="center">
<input type="text" name="keyword" size="18" style="background-color: #FFFFFF; border: 1 solid #28AC00">
<br>
<input type="submit" name="Submit" value="搜 索" style="background-color: #F3FCF1; border: 1 solid #28AC00">
<input type="reset" name="Submit2" value="取 消" style="background-color: #F3FCF1; border: 1 solid #28AC00">
</div>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
<table border="0" width="100%" height="36">
<tr>
<td width="100%" height="32"></td>
</tr>
</table>
<p> 

</td>
<td width="3" height="143"></td>
<td height="143" valign="top" align="right" width="551">
<table width="522" border="0" cellpadding="0" cellspacing="0" align="center" height="293">
<tr>
<td height="20" width="520">
<p align="left"><font color="#FFDA5B">文章类型:lx </font>
</td>
</tr>
<tr>
<td height="23" width="520">
<div align="center"><b><font size="4" color="#FF9933">H_Title</font></b></div>
</td>
</tr>
<tr>
<td height="21" width="520">
<div align="center"><font color="#FFDA5B">作者:zuozhe 来源:laiyuan  文章加入时间:Date</font></div>
</td>
</tr>
<tr>
<td height="21" width="520">
<hr size="1">
</td>
</tr>
<tr>
<td height="50" width="520">
<p style="line-height: 200%">H_Memo</p>
</td>
</tr>
<tr align="right">
<td height="21" width="520"> </td>
</tr>
<tr>
<td height="21" width="520">
<hr size="1">
</td>
</tr>
<tr>
<td id=p1 width="520"></td>
</tr>
<tr>
<td height="28" width="520">
<div align="right">
<input style='background-color: #E3F9E3; border: 1 solid #28AC00' 9pt type=button value=关闭窗口 onClick=javascript:window.close() name="button">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="754">
<tr>
<td width="100%"></td>
</tr>
</table>

</body>

</html>
<script language="javascript" src="about.asp?about=labout&sid=p1"></script>

只是一个雏形,结合问题请帮忙解决一下/。
madpolice 2005-04-11
  • 打赏
  • 举报
回复
不知道你是什么模版.

不过你的需求就用script来做就行。
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
<script src="count.asp?id=New_id"></script>放到模板的任何地方都没用?????
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
楼上的意思我明白,页面中是有<script src="count.asp?bianhao=14"></script>,但刷新新闻页面或重新打开连接并不加点击数。
madpolice 2005-04-11
  • 打赏
  • 举报
回复
sun94510451(中原)
To:madpolice() ,你的id是获得不到的,上一页过来的是.htm文件路径,怎么有id 过来呢?
-------------------------------------

答复:
你的html不是根据数据库内容用fso生成的吗?
生成的时候把数据库中的id用fso写进html不就行了吗?
jzywh 2005-04-11
  • 打赏
  • 举报
回复
<script src="count.asp"></script>
myvicy 2005-04-11
  • 打赏
  • 举报
回复
就是打开一个asp文件,并且传递页面地址进去(或自定义的参数),然后对应数据库加1,或者是文本计数器加1。就可以了。
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
请问用js具体怎么写??
sun94510451 2005-04-11
  • 打赏
  • 举报
回复
To:madpolice() ,你的id是获得不到的,上一页过来的是.htm文件路径,怎么有id 过来呢?
goodstuday 2005-04-11
  • 打赏
  • 举报
回复
同意楼上的
或用js文件也可以
madpolice 2005-04-11
  • 打赏
  • 举报
回复
很简单阿
<html>
<body>
<script src="count.asp?id="></script>
</body>
</html>
fantiny 2005-04-11
  • 打赏
  • 举报
回复
静态网页里面用一个大小为1*1的iframe来计算页面点击数的就可以了。实现简单,又不会有多少影响。

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧