使用JS脚本,怎么能够导出一周内wiki中每个用户编辑的页面数、统计每个用户的总编辑量(字节计量)。

解决方案 »

  1.   

    纯js好像不很能实现的样子 感觉还是建个库,当用户点编辑的时候通过ajax或其他方式调用后台得方法来修改数据库的对应字段得值,然后把这个值查出来显示更靠谱一点
      

  2.   

    首先来看一下这个实现的思路:1.在所有有是示新闻标题的页面的最后面加上一个<iframe>2.写一个JS函数可以传递新闻ID,通过这段代码document.getElementByIdx("addnewsnum").src="/include/addnewsnum.asp?newsid="+newsid来刷新IFRMAE里的页面,并在每条新闻的点击事件上应用这个JS函数以下是JS函数:function addclick(newsid){
     document.getElementByIdx("addnewsnum").src="<%=sitehead%>/include/addnewsnum.asp?newsid="+newsid
    }以下是ASP页面中代码:<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <!--#include file="conn.asp" -->
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>添加点击</title>
    </head><body>
    <%
    newsid=Request.QueryString("newsid")
    if newsid<>"" then
     sql="select * from comnews where newsid="&newsid
     set rs=conn.execute(sql)
     if not rs.eof and not rs.bof then
      sql="update comnews set clicks=clicks+1 where newsid="&newsid
      conn.execute(sql)
     end if
     clsrs
     clsconn
    end if
    %>
    </body>
    </htm>