差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| countdowns [2020/08/30 11:53] – watalu | countdowns [2020/08/30 12:01] (現在) – watalu | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ==== 2020 ==== | ==== 2020 ==== | ||
| - | |||
| - | <script language=" | ||
| - | function CountdownTimer(elm, | ||
| - | | ||
| - | } | ||
| - | CountdownTimer.prototype={ | ||
| - | | ||
| - | this.elem = document.getElementById(elm); | ||
| - | this.tl = tl; | ||
| - | this.mes = mes; | ||
| - | | ||
| - | var timer=''; | ||
| - | var today=new Date(); | ||
| - | var day=Math.floor((this.tl-today)/ | ||
| - | var hour=Math.floor(((this.tl-today)%(24*60*60*1000))/ | ||
| - | var min=Math.floor(((this.tl-today)%(24*60*60*1000))/ | ||
| - | var sec=Math.floor(((this.tl-today)%(24*60*60*1000))/ | ||
| - | var milli=Math.floor(((this.tl-today)%(24*60*60*1000))/ | ||
| - | var me=this; | ||
| - | |||
| - | if( ( this.tl - today ) > 0 ){ | ||
| - | if (day) timer += '< | ||
| - | if (hour) timer += '< | ||
| - | timer += '< | ||
| - | | ||
| - | tid = setTimeout( function(){me.countDown(); | ||
| - | }else{ | ||
| - | | ||
| - | | ||
| - | } | ||
| - | | ||
| - | } | ||
| - | function CDT(){ | ||
| - | var tl = new Date(' | ||
| - | var timer = new CountdownTimer(' | ||
| - | | ||
| - | } | ||
| - | window.onload=function(){ | ||
| - | | ||
| - | } | ||
| - | </ | ||
| === M2 === | === M2 === | ||