Computer, Internet & Webmasters Zone...
Don't Forget to visit our Website at : www.CyberNinja.110mb.Com
Computer, Internet & Webmasters Zone...
Don't Forget to visit our Website at : www.CyberNinja.110mb.Com
Computer, Internet & Webmasters Zone...
Would you like to react to this message? Create an account in a few clicks or log in to continue.


The Best Forum With All The Useful Tips And Tricks and Guidance Regarding computer and internet security , Webmasters, software and sites review , webdesigning , html , css , javscripts etc.
 
HomeLatest imagesSearchRegisterLog in

 

 Stop Watch In Javascript

Go down 
4 posters
AuthorMessage
kriti.kulkarni

kriti.kulkarni


Posts : 2
Blades : 10178
Join date : 2010-06-15

Stop Watch In Javascript Empty
PostSubject: Stop Watch In Javascript   Stop Watch In Javascript I_icon_minitimeWed 16 Jun 2010 - 10:21

Can you please provide me the code for placing a STOP WATCH in my webpage .

I am running a survey and need a stop watch urgently..




Krits
India
Back to top Go down
anjana

anjana


Posts : 7
Blades : 9972
Join date : 2010-11-29
Age : 37
Location : India

Stop Watch In Javascript Empty
PostSubject: where is the script??   Stop Watch In Javascript I_icon_minitimeMon 29 Nov 2010 - 9:16

Hey this question is been asked long BACK, and there is still no script out here. Is this forum dead . am i wasting my time here...??

I also needed the same for my blog, to show christmas countdown. But now i feel that christmas will be over before i get the clock.

Evil or Very Mad Evil or Very Mad Evil or Very Mad
Back to top Go down
Admin
Admin
Admin
Admin


Posts : 30
Blades : 11856
Join date : 2008-04-15
Age : 40
Location : Cyber World.

Stop Watch In Javascript Empty
PostSubject: Sorry   Stop Watch In Javascript I_icon_minitimeWed 8 Dec 2010 - 15:24

Actually this question was not answered as the user was given the link to download this script...

Anyways we are sorry for this stupidity..

Here is the script..


Insert it between where ever you wanna display the watch..

Code:
<SCRIPT LANGUAGE="JavaScript">
/*
[You must be registered and logged in to see this link.]
*/

var ms = 0;
var state = 0;

function startstop() {
if (state == 0) {
state = 1;
then = new Date();
then.setTime(then.getTime() - ms);
} else {
state = 0;
now = new Date();
ms = now.getTime() - then.getTime();
document.stpw.time.value = ms;
  }
}

function swreset() {
state = 0;
ms = 0;
document.stpw.time.value = ms;
}

function display() {
setTimeout("display();", 50);
if (state == 1)  {now = new Date();
ms = now.getTime() - then.getTime();
document.stpw.time.value = ms;
  }
}

window.onload=display
</SCRIPT>


<CENTER>
<FORM NAME="stpw">
Time:
<INPUT TYPE="text" Name="time">
<INPUT TYPE="BUTTON" Name="ssbutton" VALUE="Start/Stop" onClick="startstop()">
<INPUT TYPE="BUTTON" NAME="reset" VALUE="Reset" onClick="swreset()">
</FORM>
</CENTER>

Back to top Go down
http://www.cyberninja.110mb.com
banarasi.babu

banarasi.babu


Posts : 6
Blades : 9886
Join date : 2010-11-29
Location : india

Stop Watch In Javascript Empty
PostSubject: very nice script   Stop Watch In Javascript I_icon_minitimeThu 9 Dec 2010 - 12:32

i used this script its really nice and simple...But how can i change the button colors and text box colors...can i do that??

Banarsi Babu Question Question
Back to top Go down
Sponsored content





Stop Watch In Javascript Empty
PostSubject: Re: Stop Watch In Javascript   Stop Watch In Javascript I_icon_minitime

Back to top Go down
 
Stop Watch In Javascript
Back to top 
Page 1 of 1
 Similar topics
-
» Timed Pop up in javascript
» Hi to everyone...
» Submit your Presence.
» How can i change my windows folders icons..?
» how do i format my window 7

Permissions in this forum:You cannot reply to topics in this forum
Computer, Internet & Webmasters Zone... :: Webmasters Zone :: Javascript Codes.-
Jump to: