【问题标题】:How to make counting-down timer to a specific date and time on a web technologies如何在网络技术上将倒计时计时器设为特定日期和时间
【发布时间】:2012-05-22 15:35:17
【问题描述】:

如何将计时器倒计时设置为特定日期和时间,例如日期为 6 月 1 日 00:00:00 代码必须显示到该特定日期或时间的剩余时间。

【问题讨论】:

    标签: c# javascript jquery asp.net css


    【解决方案1】:

    你可以使用jQuery Countdown Plugin

    【讨论】:

      【解决方案2】:

      或者这里有一个非常好的免费正在建设中的带有倒数计时器的模板

      http://demo.ourtuts.com/site-under-construction/

      在演示中,倒数计时器设置如下(从源代码中获取)

      $(function () {
      var austDay = new Date("December 10, 2012 02:15:00");
          $('#defaultCountdown').countdown({until: austDay, layout: '{dn} {dl}, {hn} {hl}, {mn} {ml}, and {sn} {sl}'});
          $('#year').text(austDay.getFullYear());
          });
      

      你可以只更改日期字符串

      var austDay = new Date("December 10, 2012 02:15:00");
      

      根据您的需要,您也可以根据需要更改设计。

      下载链接位于http://www.ourtuts.com/free-site-under-construction-template/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-10-19
        • 1970-01-01
        • 2019-06-04
        • 2013-06-15
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多