Jump to content

Search the Community

Showing results for tags 'countdown timer'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. I want to use this code, but when establishing a date, I noticed that it is set to GMT+1 and mine is GMT-5. I understand that it is not something serious, but it would be easier to use it in my time zone. Code: https://www.w3schools.com/howto/howto_js_countdown.asp Thanks and regards.
  2. Hi, i am making a countdown timer that needs to countdown every 7 hours.seti have a time now that i can set to any time. and it counts down. now i want that it counts down ever 7 hours (starting at 14:02 to 21:02 to 4:02 to 11:02 ect)my questions are:1.how do i make it start on a specific time?2. how do i make it so that the timer does not start over everytime you refresh the page, or go to the page? i am pretty new to Javascript and this is the first thing i am "making"here is my code so farits just a countdown timer that counts down 5 seconds and restarts var Timer;var TotalSeconds; function CreateTimer(TimerID, Time) { Timer = document.getElementById(TimerID); TotalSeconds = Time; UpdateTimer() window.setTimeout("Tick()", 1000);}function Tick() { if (TotalSeconds <= 0) { Timer.innerHTML = " Time's up "; window.setTimeout("Tick", 1000); CreateTimer("timer", 5) return; } TotalSeconds -= 1; UpdateTimer() window.setTimeout("Tick()", 1000);}function UpdateTimer() { var Seconds = TotalSeconds; var Days = Math.floor(Seconds / 86400); Seconds -= Days * 86400; var Hours = Math.floor(Seconds / 3600); Seconds -= Hours * (3600); var Minutes = Math.floor(Seconds / 60); Seconds -= Minutes * (60); var TimeStr = ((Days > 0) ? Days + " days " : "") + LeadingZero(Hours) + ":" + LeadingZero(Minutes) + ":" + LeadingZero(Seconds);Timer.innerHTML += " " + TotalSeconds; Timer.innerHTML = TimeStr; }function LeadingZero(Time) { return (Time < 10) ? "0" + Time : + Time;} </script> i put this in the html: <div id="timer" ><script type="text/javascript">window.onload = CreateTimer("timer", 5);</script></div >
×
×
  • Create New...