functionCountdown (Time, FN) {varMaxTime = (NewDate (Time)-NewDate ())/1000;//remaining seconds varTimer = SetInterval (function () { if(MaxTime >= 0) { varDD = parseint (MAXTIME/60/60/24, 10);//calculate the number of days remaining varHH = parseint (maxtime/60/60% 24, 10);//calculate the number of hours remaining varMM = parseint (maxtime/60% 60, 10);//calculate the number of minutes remaining varSS = parseint (maxtime% 60, 10);//calculate the number of seconds remainingHH =checktime (HH); MM=checktime (mm); SS=Checktime (ss); Msg= "Time remaining" + DD + "Day" + hh + "when" + mm + "min" + SS + "SEC"; FN (msg); --MaxTime; } Else{clearinterval (timer); FN ("Closed"); } }, 1000);}functionChecktime (i) {if(I < 10) {i= "0" +i; } returni;}/*How to use <script type= "Text/javascript" > Countdown (' 2015-5-29 10:40:44 ', function (msg) { $ (' #time_1 '). Text (msg); }); </script>*/
JS Multiple countdown Coexistence