Share on Google+Share on Google+

vishal sathe
calculate the time ..
0 Answer(s)      4 years and 10 months ago
Posted in : HTML

[CODE] Elapsed Time Example

    <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.

Ads

View Answers









Related Tutorials/Questions & Answers:
calculate the time ..
calculate the time ..  [CODE] Elapsed Time Example...() { startTime = new Date(); alert("Time Started...(); alert("Time Stopped"); } function calculateTimeElapsed
calculate difference between two time in jsp
calculate difference between two time in jsp  How to calculate difference between two dates
Advertisements
Calculate process time in Java
Calculate process time in Java       This section provides the facility to calculate the process time of the completion of the operation through the Java program
calculate total hours by start time and end time in javascript - Ajax
calculate total hours by start time and end time in javascript  hi, i am doing Web surfing project. i used start and end timepicker field.it works... my doubts. how to calculate total hours by using start and end time field
Java example to calculate the execution time
Java example to calculate the execution time       get execution time This example program will describe you the way that how one can calculate or get the execution time
Having a hard time writing program to calculate test scores..........
Having a hard time writing program to calculate test scores..........  i need a program that does this:Standardized Test Scores A local high... into the array. Then calculate and output the following statistics: average score
calculate average
calculate average  Question 2 cont.d Test case c: home works/labs 10 9 9 9 10 10 9 9 10 10 9 9 10 test scores: 65 89 note, the program should work with different numbers of home works/labs
How to calculate attending hours?
How to calculate attending hours?  I need to calculate attending hours of a employee in a day in my project to make their monthly salary . By using work starting time and ending time. How should I do it using Date class? Or any
calculate average
calculate average   Design and write a java program to determine all three digit numbers such that the sum of the cubes of the digits is equal... and write a program and calculate your final average in this course. The details
time
time  how to find the current system time between the user login and logout using java
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do? For this i already received the answer. But its converting the time in 24hr format to 12hr format
time
time  sir, i want to show system time on a textfield in awt(java). woulk you send me an example of time which can show time in standard format like H:M:S pls help me sir   Display time in JTextField import
time
time format hh:mm:ss  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do?   Here is a jsp example that fetch the time from the database and display
time
time display only as hh:mm.  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do?   Here is a jsp example that fetch the time from the database
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do?   Here is a jsp example that fetch the time from the database and display in different
time
time  Hi. I have retrieved time from mysql database. its in th format hh:mm:ss. but i want to display only as hh:mm. wat to do?   Here is a jsp example that fetch the time from the database and display in different
time
retrieved time from mysql database  Hi. I have retrieved time from.... wat to do?   Here is a jsp example that fetch the time from... is a jsp example that fetch the time from the database and display in different
calculate reward points.
calculate reward points.  How to calculate reward points in a multiplex automation system
calculate size of array
calculate size of array  Is it possible to calculate the size of array using pointers in Java
calculate sum of individual digit
calculate sum of individual digit   How calculate product of first and last digit of indiviual numbers Like a=43278 4*8=32
Code to calculate hair density
Code to calculate hair density  Hello, Would you please give me a code to calculate the hair density on scalp from image in java
calculate sum of individual digit
calculate sum of individual digit  Hi How to calculate product of first snd last digit of indiviual digit Like Num=23456 S=2*6
How to calculate days in a year
How to calculate days in a year  Hi, How to calculate no of days in a year? I want a program that calculates no of days in a year by specifying year a parameter. Thanks   Hi, Please check the thread example
How to calculate the average in Hibernate?
How to calculate the average in Hibernate?  Hi, I have to calculate the average in Hibernate. How to calculate the average in Hibernate? Thanks   Hi, You can use the project in Hibernate. Here is the example code
Tutorials   
Java Spring Hibernate Struts Training How to display button as a link in vaadin? hi change navbar dropdown color in bootstrap How to remove the background color of bootstrap menu bar? How to change color of opened Bootstrap drop down toggle? Setting bootstrap container background color Help school all activities and admision process.. add one row after another date make a webpage HTMl HTMl Source code how to apply globalisation to a world wide asp.net application how to print HTML using javascript or Jquery How to recover from google panda update? How to survive google panda 4.0 update How to find if you have been hit by Panda 4.0 Design a web page using XHTML and JavaScript that does the followings: ffmpeg converting file mp4 to mov JavaScript How to Disable Catch-all Emails on CPanel z-index always on top What is Web hosting Database and HTML web development trainee Uploading files Image Gallery Image Gallery dropdown How to redirect from a HTML page? Easiest method for expiring the css and js headers HTML WITH AJAX VB 6 Read Web Page Header string palindrom using vbscript? html button How to add mod_deflate to apache without recompiling How to use place hoder in IE(version : 8) Html Software Question div align left css Fetching data from excel file on other website and display in interactive graph form where do I find the fix for tree view catalog not expanding and collapsing correctly for roseindia shopping cart 1.1 pass to next page to enter into a particular page only if the username,password and listbox value mtches hi Cricket stadium ticket booking design Need some help creating an order form. HTML div tag HTML div tag

Ads

 
Advertisement null

Ads