Search tutorials
Miliseconds
Including miliseconds is really easy. To do so, just include this code:
miliseconds = Math.ceil(total - sum) - 1;
if (miliseconds == 1000) {miliseconds = "000";}
if (miliseconds == 1000) {miliseconds = "000";}
Then just add on to the timetil code to include the miliseconds.
Keeping miliseconds in 3 digits
If you leave it at that it works, however the width of the time displayed will change when the amount of digits chage. To fix this, add this code above the timetil code:
if(miliseconds<100){
milisecond=("0"+miliseconds);
if(miliseconds<10){
miliseconds = ("0"+miliseconds)
}
}
milisecond=("0"+miliseconds);
if(miliseconds<10){
miliseconds = ("0"+miliseconds)
}
}
Thats about it, any questions or comments feel free to email me.
» Level Basic |
Added: 2006-03-11 Rating: 4 Votes: 3 |
» Author |
Full time student interested web design. |
» Download |
Download the files used in this tutorial. |
Download (0 kb) |
» Forums |
More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.
Comments
There are no comments yet. Be the first to comment!