Hi to all
can we calculate how long user stay in a page using javascript?
I write a page as a questionary
when you finish page 1 and click the button it will transfer to page 2 to continue question on page 2
I would like to know the time user spend on every page... and then show the record on last page
how to calculate and record ?
Need javascriptt code.
thank you
regards
bhanu
calculate how long user stay in a page using javascript?
Moderator: General Moderators
Re: calculate how long user stay in a page using javascript?
No need for JavaScript that I can see.
I'm guessing you're imposing a time limit on the whole process? When the first page loads, record the current time somewhere in the session. On each page load after, compare the current time against the recorded time.
I'm guessing you're imposing a time limit on the whole process? When the first page loads, record the current time somewhere in the session. On each page load after, compare the current time against the recorded time.