这个最好在数据库加这么个字段,要不就要用全局变量或是文件操作了。

解决方案 »

  1.   

    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>button点击次数</title>
    <script type="text/javascript">
    var flag = 0;
    function xlh(){
    flag += 1;
    document.getElementById("txt").value = flag;
    }
    </script>
    </head><body>
    <input type="text" id="txt" value="0" />
    <input type="button" value="点击" onclick="xlh()" />
    </body>
    </html>
      

  2.   

    上面的程序只能对单独客户做处理,如果你想得到的是整个所有客户的点击量就不行了
      

  3.   

    还是写到数据库里去好了。不然还真不好统计
      

  4.   

    不知道那些网站的点击数是怎么统计实现的,可以借鉴应该
      

  5.   

    非常谢谢大家的热心回答,共同进步!