Javascript 时间 倒计时
更新一下时间倒计时插件(jQUery) 1 $.fn.genTimer = function (e) { 2 function u(e) { 3 var t = Math.floor(e / n), 4 r = Math.floor((e - t * n) / 36e5), 5 i = Math.floor((e - t * n - r * 1e3 * 60 * 60) / 6e4), 6 s = Math.floor((e - t * n - r * 1e3 * 60 * 60 - i * 1e3 * 60) / 1e3); 7 return { 8 hours: ("0" + r).slice(-2), 9 minutes: ("0" + i).slice(-2), 10 seconds: ("0" + s).slice(-2), 11 dates: t 12 } 13 } 14 if (this.data("handled")) return this; 15 this.data("handled", !0); 16 var t = { 17 beginTime: new Date, 18 day_label: "day", 19 days_label: "days", 20 unitWord: { 21 hours: ":", 22 minutes: ":", 23