计算在一个ASP页面停留的时间

丝路花雨
发信人: fuchsia (gg), 信区: CGI
标 题: 计算在一个ASP页面停留的时间
发信站: 开放空间 (Tue Oct 12 16:51:37 1999), 转信
==================================================================
===========
板主圈点:
其实这个题目没有多大意义,请大家只注意一下其中用到的一些方法:
Request.QueryString(s)
Datediff(part,t_start,t_end)
Now
Server.URLEncode(s)
以及其他一些句式及链接构造方法等
==================================================================
===========
在一个ASP页面停留多少时间
<% 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.
--
☆ 来源:.开放空间 bbs.nwpu.dhs.org.[FROM: www-post@bbs.nwpu.dh]

BBS丝路花雨站纪念。。。