Új hozzászólás Aktív témák

  • firewolf

    tag

    Hello mindenki!

    Van 1 visszaszámláló scriptem, ami az újévig hátralevő időt mutatja. Olyan kérdésem lenne, hogy meg lehet-e azt csinálni, hogy amikor az idő 0, akkor lejátszik valami tűzijátékos flash-t?

    A kód így néz ki:
    <script language=''JavaScript'' type=''text/javascript''>

    document.write('<font size=10> Újévig hátralévő idő:</size><br /><b><div id=''winerCountdown''></div></b>');

    winerClockCountdown();

    function toDateString(strTempString) {
    strReturnString = '''';
    if (strTempString < 10) {
    strReturnString += ''0'';
    }
    return strReturnString + strTempString.toString();
    }

    function winerClockCountdown() {
    var strEventDate = new Date(''January 01, 2007 00:00:00 GMT+1'');
    // cl = document.clock;
    newDate = new Date();
    intCount = Math.floor((strEventDate.getTime() - newDate.getTime())/1000);
    if(intCount <= 0) {
    return;
    }

    intSeconds = toDateString(intCount % 60);
    intCount = Math.floor(intCount / 60);
    intMinutes = toDateString(intCount % 60);
    intCount = Math.floor(intCount / 60);
    intHours = toDateString(intCount % 24);
    intCount = Math.floor(intCount / 24);
    intDays = intCount;

    document.getElementById(''winerCountdown'').innerHTML =
    intHours + '' Óra, '' +
    intMinutes + '' Perc, '' +
    intSeconds + '' Másodperc'';

    setTimeout(''winerClockCountdown();'', 500);

    }



    </script>

    Köszi mindenkinek a segítséget!

Új hozzászólás Aktív témák