欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-09-14 09:21:31
asp source code: ----------------------------------------------------------------------<...
asp source code:


----------------------------------------------------------------------
<% if request.querystring("time") = "" then %>
you havent 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.?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 havent 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.