如何计算查看页面的秒数? [英] how can I count the number of seconds a page is viewed?
问题描述
我猜我会保留一个变量,当它被打开时,然后在页面卸载时运行的
脚本中,我可以计算它。
如何存储时间变量?
如何根据两个时间戳计算时间(秒)?
感谢您的帮助和/或有关该主题的文章的链接!
NotGiven写道:我猜我会保留一个变量,当它被打开时,然后在页面卸载时运行的
脚本中,我可以计算它。
你如何存储一个时间变量?
如何根据两个
时间戳计算时间(秒)?
感谢您的帮助和/或指向文章的链接主题!
圣洁小伙伴。
有一个javascript变量,当页面为
$ b时,它保存日期时间戳$ b开盘了。然后当页面关闭时,你需要告诉浏览器
以下......
1.变量Var_pageViewSeconds = Var_pageStartTime - datetime(now)。
2.向您的服务器发送/发送请求(onclose - 或其他任何内容)并发送
该变量(Var_pageViewSeconds)
*不适合非JavaScript浏览器。
*不适合我(我不喜欢它,当页面构建者把''onclose''
的东西放在页面)。
希望这会有所帮助。
" NotGiven" <无**** @ nonegiven.net>在消息中写道
新闻:c8 ******************* @ bignews5.bellsouth.net。 ..我猜我会保存一个变量,当它被打开时,然后在页面卸载时运行的
脚本中,我可以计算它。
如何存储时间变量?
如何根据两个时间戳计算时间(秒)?
感谢您的帮助和/或链接到有关该主题的文章!
只需在每页上获得一个时间戳。
on a * nix框,您可以执行以下操作。
声明会话变量
sessTime
set
I am guessing I would hold a variable of when it''s opened, then in the
script that runs when the page is offloaded, I coudl calcualte it.
How do you store a time variable?
How do you calculate the amount of time (seconds) based on two timestamps?
Thanks for your help and/or links to articles on the subject!
NotGiven wrote:I am guessing I would hold a variable of when it''s opened, then in the
script that runs when the page is offloaded, I coudl calcualte it.
How do you store a time variable?
How do you calculate the amount of time (seconds) based on two
timestamps?
Thanks for your help and/or links to articles on the subject!
holy moly dude.
have a javascript variable that hold the datetime stamp when the page is
opened. Then when the page is closed, you need to tell the browser the
following...
1. variable Var_pageViewSeconds = Var_pageStartTime - datetime(now).
2. post/send request to your server (onclose - or whatever it is) and send
it that variable (Var_pageViewSeconds)
* wont work for non javascript browsers.
* wont work for me (i dont like it when page builders put the ''onclose''
thing in the page).
hope this helps.
"NotGiven" <no****@nonegiven.net> wrote in message
news:c8*******************@bignews5.bellsouth.net. ..I am guessing I would hold a variable of when it''s opened, then in the
script that runs when the page is offloaded, I coudl calcualte it.
How do you store a time variable?
How do you calculate the amount of time (seconds) based on two timestamps?
Thanks for your help and/or links to articles on the subject!
just get a time stamp on each page.
on a *nix box, you could do something like the following.
declare a session variable
sessTime
set
这篇关于如何计算查看页面的秒数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!