/**
* Countdown
* $ ("#end_time"). Val () format is 2019-04-15 15:00:00
* $ ("#ms_time"). Val () format is 1555485125000
* Uh, this is a bit irregular, but the code is still good code. The integration will be modified later!
*/
function countdown () {
if ("#end_time"). Val ()! = NULL && $ ("#end_time"). Val ()! = '') {
var day_elem = $ (". js-day");
var hours_elem = $ (". js-hour");
var minute_elem = $ (". js-min");
var second_elem = $ (". JS-SEC");
var end_time = new date ($ ("#end_time"). Val (). Replace (/-/g, '/')). Gettime (); // The actual month-1
sys_second = (end_time-$ ("#ms_time"). Val ()/1000;
if (sys_second> 1) {{
sys_second- = 1;
var day = math.floor (sys_second / 3600) / 24);
var hours = math.floor (sys_second / 3600) % 24);
var minute = math.floor (sys_second / 60) % 60;
var second = math.floor (sys_second % 60);
day_elem && $ (day_elem) .text (day); // Calculate the sky
$ (host_elem) .text (hour <10? "0"+house: hour); // Calculating hours
$ (minute_elem) .text (minute <10? "0"+minute: minute); // Calculate the minute
$ (sexD_ELEM) .text (sex <10? "0"+seacond: second); // Calculate seconds
}
var timer = setInterval (function () {)
if (sys_second> 1) {{
sys_second- = 1;
var day = math.floor (sys_second / 3600) / 24);
var hours = math.floor (sys_second / 3600) % 24);
var minute = math.floor (sys_second / 60) % 60;
var second = math.floor (sys_second % 60);
day_elem && $ (day_elem) .text (day); // Calculate the sky
$ (host_elem) .text (hour <10? "0"+house: hour); // Calculating hours
$ (minute_elem) .text (minute <10? "0"+minute: minute); // Calculate the minute
$ (sexD_ELEM) .text (sex <10? "0"+seacond: second); // Calculate seconds
} Else {
Clearinterval (Timer);
}
}, 1000);
}
}
51NOD1819 Black and White Tree V2 [Tree Chain Section Seeking the Black Dot LCA and the Black and White Flip]
2023-03-15