<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8" /><title>JS Implementation countdown (hours, minutes, seconds)</title> <Scriptlanguage= "JavaScript"type= "Text/javascript"> varinterval= +; functionShowcountdown (year,month,day,divname) {var Now= NewDate ();varendDate= NewDate (year, month-1, day); varLefttime=enddate.gettime ()-now.gettime ();varLeftsecond=parseint (Lefttime/1000); //var day1=parseint (leftsecond/(24*60*60*6));varDay1=Math.floor (Leftsecond/(60*60*24)); varHour=Math.floor ((Leftsecond-Day1* -* -* -)/3600); varminute=Math.floor ((Leftsecond-Day1* -* -* --Hour*3600)/60); varSecond=Math.floor (Leftsecond-Day1* -* -* --Hour*3600-minute* -); varcc=document.getElementById (divname); cc.innerhtml= "Script Home Tips distance"+ Year+"years"+Month+"Month"+ Day+"The Day also has:"+Day1+"days"+Hour+"hours"+minute+"points"+Second+"seconds"; } Window.setinterval (function() {Showcountdown (2018,1,5,'divdown1');}, Interval); </Script> </Head> <Body> <DivID= "Divdown1"></Div> </Body> </HTML>
JS Countdown Implementation code (hours, minutes, seconds)