2 Replies Latest reply on Jul 26, 2011 4:07 PM by pchinique

    I have this 24 hour countdown javascript but I need to remove something from it and I don't know how

    pchinique Level 1

      I found this javascript that is perfect for what I want but it displays the actual date on top of the countdown. Can any one help me to remove this date or hide it some how?





      <script type="text/javascript">
      function ShowTimes() {
      var now = new Date();
        var hrs = 23-now.getHours();
        var mins = 59-now.getMinutes();
        var secs = 59-now.getSeconds();
        var str = '';
           str =    now.toString();
            str += '<br>0 days '+hrs+' hours '+mins+' minutes '+secs+' seconds';
        document.getElementById('countdownToMidnight').innerHTML = str;
      /*var _cntDown;
      function StopTimes() {




      <body onload="_cntDown=setInterval('ShowTimes()',1000)">
      <div id="countdownToMidnight"></div>
      <!--<button onclick="StopTimes()">Stop</button>-->