PHP - 동시에 여러개의 날짜 계산
https://plugins.jquery.com/countdown/
The Final Countdown | jQuery Plugin Registry
The Final Countdown by Edson Hilios jQuery plugin to display a countdown clock on your page. Versions Version Date 2.0.4 Jun 3 2014 2.0.2 Dec 12 2013 2.0.2 Dec 12 2013 2.0.1 Nov 1 2013 1.0.2 Nov 1 2013 1.0.0 Apr 9 2013
plugins.jquery.com
jquery 카운트 다운을 사용한다
<header>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="/asserts/jquery.countdown.js"></script>
<script type="text/javascript" src="/asserts/jquery.countdown.min.js"></script>
<body>
<div id="example1" data-countdown="01/01/2022 12:10:59"></div>
<div id="example2" data-countdown="01/01/2022"></div>
<div id="example3" data-countdown="2022/01/02 12:10:59"></div>
<div id="example4" data-countdown="2022/01/02"></div>
<script>
$(function(){
$('[data-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data('countdown');
$this.countdown(finalDate, function(event) {
$this.html(event.strftime('%D일 %H:%M:%S'))}).on('finish.countdown', function() {
alert("Finish");
});
});
});
</script>
자세한 부분은 하단링크 참조
http://hilios.github.io/jQuery.countdown/documentation.html
Documentation - jQuery.countdown
Install We provide two installation methods: Bower bower install jquery.countdown Manual Download the files and add a script to your html: Requirements The latest versions supports jQuery from 1.7 up to >= 2.1. For legacy support (<= 1.6) please use the ve
hilios.github.io