Welcome To Paki Tigers Community


 
HomeFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Timing Event With Stop Button

Go down 
AuthorMessage
Admin
Admin


Posts : 102
Join date : 2008-09-25
Age : 27
Location : Pakistan

PostSubject: Timing Event With Stop Button   Sat Oct 04, 2008 6:32 am

Hello Everybody

This is another timer tutorial


<html>
<head>
<script type="text/javascript">
var c=0;
var t;
function timedCount()
{
document.getElementById('txt').value=c;
c=c+1;
t=setTimeout("timedCount()",1000);
}

function stopCount()
{
clearTimeout(t);
}
</script>
</head>

<body>
<form>
<input type="button" value="Start count!" onClick="timedCount()">
<input type="text" id="txt">
<input type="button" value="Stop count!" onClick="stopCount()">
</form>
<p>
Click on the "Start count!" button above to start the timer. The input field will count forever, starting at 0. Click on the "Stop count!" button to stop the counting.
</p>
</body>

</html>
Back to top Go down
View user profile http://paki-tigers.forumotion.com
 
Timing Event With Stop Button
Back to top 
Page 1 of 1
 Similar topics
-
» Security Alert with yes, no, view certificate button
» 'Play Current Test Case' button not support to Ruby language.
» Event is not fired with IDE
» Rollover Button Using CSS
» problem in selecting radio button in selenium RC

Permissions in this forum:You cannot reply to topics in this forum
Welcome To Paki Tigers Community :: Programming / Designing / Source Code :: Html, Java Script & Css-
Jump to: