毎日特定の時間、たとえば EST 時間の午後 12 時までカウントダウンするにはどうすればよいですか? 午後 12 時 / 昼食まで 1 時間 56 分としてカウントダウンしますか? テキストであり、ページが更新されたときにのみ更新されるため、CSS や JS を必要としない、短くてシンプルなものを探しています。
1144 次
2 に答える
2
ご存知かどうかわかりませんが、google.comという 1 兆ドル規模のサイトがあります。ウェブ上で最高の結果が得られる用語を検索できます。いつか試してみてください。
それをチェックしてください、これが最初の結果です!
http://www.tripwiremagazine.com/2011/04/9-cool-jquery-countdown-scripts.html
于 2011-05-10T16:25:15.810 に答える
0
これが他の誰かを助ける場合に備えて私が探していたものです。
function countdown($year, $month, $day, $hour, $minute)
{
$the_countdown_date = mktime($hour, $minute, 0, $month, $day, $year, -1);
$current = time();
$difference = $the_countdown_date - $current;
if ($difference < 0) $difference = 0;
$days = floor($difference/60/60/24);
$hours = floor(($difference - $days*60*60*24)/60/60);
$minutes = floor(($difference - $days*60*60*24 - $hours*60*60)/60);
echo "Checkback in ".$hours." hours and ".$minutes." minutes";
}
countdown(2016,1,1,12,0);
于 2011-05-11T00:23:32.450 に答える