Joke Collection Website - Public benefit messages - JS countdown implementation code (hours, minutes, seconds)
JS countdown implementation code (hours, minutes, seconds)
defined variable
space
=
1000;
function
ShowCountDown (year, month, day, partition name)
{
defined variable
at present
=
new
date();
defined variable
end date
=
new
Date (year,
Month-1,
Day);
defined variable
left time = end date . gettime()-now . gettime();
defined variable
Left second
=
parse int(left time/ 1000);
//var
day 1 = parse int(left second/(24 * 60 * 60 * 6));
defined variable
day 1 = math . floor(left second/(60 * 60 * 24))。
defined variable
hour = math . floor((left second-day 1 * 24 * 60 * 60)/3600);
defined variable
minute = math . floor((left second-day 1 * 24 * 60 * 60-hour * 3600)/60);
defined variable
Second = math.floor (leftsecond-day1* 24 * 60 * 60 hours *3600 minutes * 60);
defined variable
Replicated copy
=
document . getelementbyid(div name);
cc.innerHTML
=
"Script House prompts that the distance from"+year+"year"+month+"day+"is "+day 1+" day "+hour+"hour+"minute+"second ";
}
window . setinterval(function(){ show count down(20 10,4,20,' div down 1 '); },
Interval);
[Ctrl+A
complete inspection
Note: If external Js needs to be introduced, it needs to be refreshed before it can be realized]
- Previous article:How to use the money in the purse of Baiguoyuan
- Next article:Remember the meaning
- Related articles
- How to open SMS service with China bank card
- Online merchant bank cancellation always prompts what is going on.
- Eight Best Web Hosting Services for High Traffic Websites in 2022
- Blessing messages from graduating senior brothers and sisters
- Working hours of rural commercial banks
- Winter Solstice well-being blessings
- Bank card opens SMS reminder. Will it be received at any time?
- Humorous short messages about Langzhong
- Gansu Mobile 10658 159 received a blank or garbled message.
- Sichuan Agricultural Bank does not open SMS service, will it deduct money?