Posted By

scorpayllc on 05/02/13


Tagged


Versions (?)

Countdown


 / Published in: JavaScript
 

  1. <script>
  2. <!--
  3. //
  4. var milisec = 0
  5. var seconds = 65
  6. document.counter.d2.value = '65'
  7.  
  8. function display() {
  9. if (milisec <= 0) {
  10. milisec = 9
  11. seconds -= 1
  12. }
  13. if (seconds <= -1) {
  14. milisec = 0
  15. seconds += 1
  16. } else milisec -= 1
  17. document.counter.d2.value = seconds + "." + milisec
  18. setTimeout("display()", 100)
  19. }
  20. display()
  21. -->
  22. </script>

Report this snippet  

You need to login to post a comment.