Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,255
Total Threads: 81,172
Total Posts: 566,871
There are 49 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming :

Help Please!

Thread title: Help Please!
Reply    
    Thread tools Search this thread Display Modes  
02-11-2011, 05:45 PM
#1
genius007 is offline genius007
Status: I'm new around here
Join date: Feb 2011
Location: Jhelum
Expertise: Design
Software: Photoshop
 
Posts: 5
iTrader: 0 / 0%
 

genius007 is on a distinguished road

  Old  Help Please!

Hello friends,
Does anyone know that how to add stop watch in webpage?
Thanks in advance and waiting for your reply!

Reply With Quote
02-11-2011, 06:48 PM
#2
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,893
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Reply With Quote
Thanked by:
DDS (02-12-2011)
05-11-2011, 12:20 PM
#3
linkbuilding5 is offline linkbuilding5
Status: I'm new around here
Join date: Apr 2011
Location:
Expertise:
Software:
 
Posts: 16
iTrader: 0 / 0%
 

linkbuilding5 is on a distinguished road

  Old

You can implement by using this javascript code.
<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
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;
}
}
// End -->
</SCRIPT>

<!-- STEP TWO: Add this onLoad event handler into the BODY tag -->

<BODY onLoad="display()">

<!-- STEP THREE: Put this code into the BODY of your HTML document -->

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

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.42 KB -->

Reply With Quote
Reply    


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed