| 在一个ASP页面停留的多少时间的程序 |
|
作者:佚名 文章来源:网海之贝 点击数: 更新时间:2004-9-6 0:58:47  |
ASP Source Code:
---------------------------------------------------------------------- <% If Request.QueryString("time") = "" Then %> You haven't clicked on the link below yet.<BR> <% Else %> You spent <%= DateDiff("s", Request.QueryString("time"), Now()) %> seconds looking at the previous page.<BR> <% End If %> <BR> <A HREF="time.asp?time=<%= Server.URLEncode(Now())%>">How long have I spent on this page?</A><BR> <BR> This script passes the time in a QueryString parameter. You could just as easily store it in a session variable, log it to a database, or write it to a text file. It all depends upon what you intend to use the information for.
----------------------------------------------------------------------
ASP Source Code:
----------------------------------------------------------------------
<% If Request.QueryString("time") = "" Then %> You haven't clicked on the link below yet.<BR> <% Else %> You spent <%= DateDiff("s", Request.QueryString("time"), Now()) %> seconds looking at the previous page.<BR> <% End If %> <BR> <A HREF="time.asp?time=<%= Server.URLEncode(Now())%>">How long have I spent on this page?</A><BR> <BR> This script passes the time in a QueryString parameter. You could just as easily store it in a session variable, log it to a database, or write it to a text file. It all depends upon what you intend to use the information for.
---------------------------------------------------------------------- |
| 文章录入:admin 责任编辑:admin |
|
上一篇文章: 一些ASP小源程序
下一篇文章: 趣味访客计数器设计两则 |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |