Download .zip |
Info | View files (2) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2012-12-15 (4 years ago) | Not enough user ratings | Total: 185 | All time: 256 This week: 44 |
Version | License | JavaScript version | Categories | |||
countdown-timer 1.0 | BSD License | 3.0 | Time and Date |
Description | Author | |
This object can show countdown for a time defined in form inputs. |
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Example Countdown Timer</title> <style type="text/css"> #ctimer { width:250px; background:#edeffe; margin:8px auto; padding:5px; text-align:center; line-height:160%; } #showmns, #showscs { font-weight:800; color:#080009; } </style> </head> <body> <form id="ctimer"> Countdown Timer: <span id="showmns">00</span>:<span id="showscs">00</span><br/> Minutes: <input type="text" id="mns" name="mns" value="0" size="3" maxlength="3" /> Seconds: <input type="text" id="scs" name="scs" value="0" size="2" maxlength="2" /><br/> <input type="button" id="btnct" value="START" onclick="obCT.setCTimer()"/> </form> <script type="text/javascript" src="countdown.js"></script> <br/><br/><br/> A JavaScript Countdown Timer that uses for the starting time data added in form fields.<br/> The button that starts the Countdown Timer is disabled after the user adds data for minutes /seconds in form fields, and clicks the button.<br/> When the Countdown Timer reaches to 0, the Start button is enabled, and it is executed the <b>cTimer0()</b> function, defined in "countdown.js" (line 10). In this function you can add a code to be executed when countdown timer reach to 0.<br/><br/> • Copy the <b>countdown.js</b> file on your server, in the same directory in which you have the page where you want to add this Countdown Timer.<br/> In that HTML document add this code: <pre style="margin:15px; color:blue; font-weight:800;"> <form id="ctimer"> Countdown Timer: &nbsp; <span id="showmns">00</span>:<span id="showscs">00</span><br/> Minutes: <input type="text" id="mns" name="mns" value="0" size="3" maxlength="3" /> &nbsp; &nbsp; Seconds: <input type="text" id="scs" name="scs" value="0" size="2" maxlength="2" /><br/> <input type="button" id="btnct" value="START" onclick="obCT.setCTimer()"/> </form> <script type="text/javascript" src="countdown.js"></script> </pre><br/><br/><br/><br/> <center>Free JavaScript & jQuery Course, tutorials, and code snippets: <a href="http://coursesweb.net/javascript/" title="Free JavaScript & jQuery Course">http://coursesweb.net/javascript/</a></center><br/> </body> </html> |
Files |
File | Role | Description |
---|---|---|
countdown.js | Class | JavaScript code |
readme.html | Example | Example and instructions |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Related pages |
Countdown Timer with starting time added into a form Page with Demo for Countdown Timer with starting time added into a form |