日期:2014-05-16  浏览次数:20561 次

如何统计html网页中的超链的点击量
例如:aa.html网页中的超链接,指向xxx.asp ,统计客户点击该超链接的点击量。

不想在xxx.asp中做统计,因为其他链接也有指向xxx.asp的。

只想统计客户通过aa.html中的超链点击转向xxx.asp。

请问 怎么实现啊?

求代码~~~~~~

------解决方案--------------------
在xxx.asp中用Request.ServerVariables("HTTP_REFERER")来获取发送页的url,如果是aa.html 
那么统计+1
------解决方案--------------------
楼上两位的思路都很好啊

如果是我的话,会用第一种, 比较直观一点
 
JScript code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
        function addAccessCount() {
            alert("增加前");
            $.post("xxx.aspx?action=addAccessCount", function () {
                alert("增加后");
            });
        }
    </script>
</head>
<body>
    <div id="divTest">
        <a href="1.htm" onclick="addAccessCount()" >ABC</a>
    </div>
</body>
</html>

------解决方案--------------------
I feel CNZZ is a good service for your requirement.
------解决方案--------------------
探讨

引用:

I feel CNZZ is a good service for your requirement.


做广告统计 cnzz不是免费的吧