![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Too lazy to wipe my ass
Industry Role:
Join Date: Aug 2002
Location: A Public Bathroom
Posts: 38,530
|
Anyone point me towards the code that does a 'count up'?
You know how certain websites display a countdown to a future event? Months / Days / Hours / Mins / Seconds etc?
I wanna do the opposite. Count up ! So it would still be the same as the above example, but it would get bigger, rather than smaller... Just simple and non flashy. Don't need bells n whistles or a fancy graphical display... Its just for personal use, but as such (ie non commercial use) I'd like it to be free? Thanks ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Mar 2011
Location: Mansfield, Ohio
Posts: 119
|
Did a bit of searching and came up with this:
Code:
<script type="text/javascript"> function secondize(n) { if (n!=0) { n= n / 1000; } return n; } var timer = { init: function() { this.startTime = (new Date()).getTime(); return this; }, stop: function() { // returns time difference (in seconds: getSeconds()) between start time and time that this function was called var difference = new Date(); var timeUsed=secondize(difference.setTime((new Date().getTime()) - this.startTime)); return timeUsed; } }; var count = timer.init(); </script> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Too lazy to wipe my ass
Industry Role:
Join Date: Aug 2002
Location: A Public Bathroom
Posts: 38,530
|
Quote:
So I made this thread. Since then I have got it working! But thanks anyway - All is good ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |