Пыльца сосны Россия
Все нюансы сборки, переработки, заготовки и применения.
-- Купить пыльцу высшего качества --

Countdown counter

Need such a counter on the site? If so, read the article, copy the code, and post it on the pages of your site.

Days Hours Minutes Seconds

The counter counts the time until a certain date that you set.

Most often this is the day, hour, minute of the end of sales.

But if you show creative imagination, then you can decorate congratulations with this gadget.

Well, or designate the end of the world.

The script is not large, very easy and does not affect the page load speed in any way, since it is loaded last.


timeend= new Date(2018, 11, 20); // Meter stop date
function Timer() {
today = new Date();
today = Math.floor((timeend-today)/1000);
if(tsec<10)tsec='0'+tsec; tmin=today%60; today=Math.floor(today/60); if(tmin<10)tmin='0'+tmin; thour=today%24; today=Math.floor(today/24); document.getElementById('d').innerHTML=today; document.getElementById('h').innerHTML=thour; document.getElementById('m').innerHTML=tmin; document.getElementById('s').innerHTML=tsec; window.setTimeout("Timer()",1000); } </script>

.count {
margin: 0;
padding: 0;
text-align: center;
color: red;
font-family: Impact;
.table {
font-size: 18px;
th, td {
border-radius: 5px;
background: rgba(255, 215, 0, .6);
th {
font-size: 29px;

<body class="count" onload="Timer()">
<table align="center" cellspacing="5" cellpadding="5">
<th><span> id="d"></span></th>
<th><span> id="h"></span></th>
<th><span> id="m"></span></th>
<th><span> id="s"></span></th>

To install the counter on one page of the site on the CMS, as in this article, script and html are inserted directly onto the page, and styles into the style.css file.

If the counter is needed on all pages, then script and html are placed either in the header.php file or in the footer.php file, anywhere.

I wish you creative success.

Запись опубликована в рубрике Free Scripts Ready Code. Добавьте в закладки постоянную ссылку.
А так же:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *