javascript – how to implement timer in continuous refreshing page?-ThrowExceptions

Exception or error:

I had a web page quiz.php which needs to reload every time to load the next question and now i want to add timer to it. But due to refreshing page timer is start every time for ever question loading. For timer had a separate file timer.js. Don’t know how to implement.

Anyone can help me. Thanks in advance.

How to solve:

On answering the first question save the spent time to the session.
on loading, the next question gets the previously spent time to add that time to timer then start the timer. Then you will capture spent time for each question.

Leave a Reply

Your email address will not be published. Required fields are marked *