RupertA
asked on
calculating elapsed time on webpage
Hi, I would like to be able to calculate the elapsed time from my webpage (page.htm) opening to the clicking of a submit button on page.htm which submits the time variable to my php file. The time would be in the format 00:00:00, where it is hours:minutes:seconds.
Could somebody give me the code for this? I would imagine I will need to put something in the head section and some code on the submit button.
Thanks.
Could somebody give me the code for this? I would imagine I will need to put something in the head section and some code on the submit button.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
as a rough idea - the big number is milliseconds
<script type="text/javascript">
var d = new Date();
d.setTime(7395000);
document.write(d+"<br/>");
document.write(d.getHours(
document.write(d.getMinute
document.write(d.getSecond
document.write(d.getHours(
</script>