
[CODE]
<script type="text/javascript">
var startTime = null;
var endTime = null;
function sayHi() {
alert("Please start the Exam...");
}
function captureStartTime() {
startTime = new Date();
alert("Time Started");
}
function captureEndTime() {
endTime = new Date();
alert("Time Stopped");
}
function calculateTimeElapsed() {
alert("Time elapsed: " + ((endTime - startTime) / 1000) + " seconds");
}
</script>
</head>
<body onload="sayHi();">
<div>
<form>
<input type="button" value="Start Time" onclick="captureStartTime();" />
<input type="button" value="Calculate Difference" onclick="calculateTimeElapsed();" />
<input type="button" value="End Time" onclick="captureEndTime();calculateTimeElapsed();" />
</form>
</div>
</body>
[/CODE] this is my code ..i want the when u start the exam start time will be shown in middle of start time and end time...and i have to give the exact time like 2 hour and 3 hours whatever...when 10 minutes remaining one popup menu come and says there is 10 minutes left
so pls help me
Thank You.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.