とても便利なjsカウントダウン! Web ページはリアルタイムでカウントダウンし、第 2 レベルまで正確で、日単位のカウントダウンと同じ原理を備えています。 jsカウントダウンはショッピングモールのウェブサイトでの共同購入や特別販売に一般的に使用されており、さまざまな場所で使用できます。皆さんのお役に立てれば幸いです! 効果は次のとおりです。 コードをコピーします コードは次のとおりです。 : <br>.leave_time_font{margin-left:35%;} <br>#fo{margin-left: 32%;} <br> /title> WoYaoNi.CN h1> document).ready(function (e) { <br>var _countSeconds = 0; <br>function _countDown(){ <br>_countSeconds; <br>$('input.surplustime').each(function(index, element) ) { <br>var $this = $(this); <br>var _totalTime = Number($this.val()) - _countSeconds; <br>var _day = parseInt(_totalTime/86400); = parseInt(_totalTime�400 /3600); <br>var _ minutes = parseInt(_totalTime�400600/60); <br>var _秒 = parseInt(_totalTime�400600`); ="日"> ' _日 '</span>日<スパン class="hour"> '</span>時間<スパン class="分"> '</span>分<span class="秒">' _秒 '</span>秒'; <br>var _str = 'カウントダウン:' _strLite; <br>if($this.next('p.daojishi')長さ > 0){ <br>$this.next('p.daojishi').html(_str); <br>}else if($this.next('p.leave_time_font').length > 0) { <br>$this.next('p.leave_time_font').html(_strLite); <br>} <br>setInterval(_countDown, 1000); <br> ini_set('date.timezone','Asia/Shanghai'); >$currenttime = time(); $a = strtotime('2014-2-14 00:00'); $b = $a-$currenttime; 友達、バレンタインデーまであと 1 人だけです: 0日0時間0分0