<Div class = "timer"> <Span id = "years"> 00 </span>: <Span id = "months"> 00 </span>: <Span id = "days"> 00 </span>: <Span id = "hours"> 00 </span>: <Span id = "minutes"> 00 </span>: <Span id = "seconds"> 00 </span> </Div>
<Script type = "text/javascript"> // Obtain the current time of the Local Machine Var mydate = new Date (); // Console. log (mydate. getFullYear (), parseInt (mydate. getMonth () + 1, mydate. getDate (), mydate. getHours (), mydate. getMinutes (), mydate. getSeconds ());
Var futureDate = eval (Date. UTC (2014, 10, 30, 12, 0, 0 )); // Var nowDate = eval (Date. UTC (2013, 11, 15, 16, 36, 52 )); Var nowDate = eval (Date. UTC (mydate. getFullYear (), parseInt (mydate. getMonth () + 1, mydate. getDate (), mydate. getHours (), mydate. getMinutes (), mydate. getSeconds ())); Var obj = { Sec: document. getElementById ("seconds "), Mini: document. getElementById ("minutes "), Hour: document. getElementById ("hours "), Day: document. getElementById ("days "), Day: document. getElementById ("months "), Day: document. getElementById ("years ") } FnTimeCountDown (futureDate, obj, nowDate, function (){ // Console. log ('Time is up! '); }); </Script> |