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

ASP Source Code:

----------------------------------------------------------------------

1 If Request.QueryString("time") = "" Then 

You haven't clicked on the link below yet.

1<br/>
1 Else 

You spent ``` = DateDiff("s", Request.QueryString("time"), Now())

1seconds looking at the previous page.

``` ``` End If ``` ```
``` ``` How long have I spent on this page? ``` ```
``` ```
``` 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:

----------------------------------------------------------------------

1 If Request.QueryString("time") = "" Then 

You haven't clicked on the link below yet.

1<br/>
1 Else 

You spent ``` = DateDiff("s", Request.QueryString("time"), Now())

1seconds looking at the previous page.

``` ``` End If ``` ```
``` ``` How long have I spent on this page? ``` ```
``` ```
``` 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.
Published At
Categories with Web编程
Tagged with
comments powered by Disqus