WEB开发网
开发学院WEB开发ASP 在一个ASP页面停留的多少时间的程序 阅读

在一个ASP页面停留的多少时间的程序

 2000-10-20 10:53:07 来源:WEB开发网   
核心提示:asp Source Code: --<% If Request.QueryString("time") = "" Then %>You haven't clicked on the link below yet.<BR><% Else %&
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.

Tags:一个 ASP 页面

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接