我怎么能设置我的倒计时脚本的当前日期



嗨,我只是想知道如何设置我的倒计时日期自动为当前数据,这是脚本:

<script>

jQuery(document).ready(function () {

    function callback() {
        alert("finish");
    }
    $("#flipit").coffeetime({
        /* COUNTDOWN SETTINGS */
        message: message, // the message array with the array keys as percent values
        startYear: 2013,
        startMonth: 8,
        startDay: 1,
        endYear: 2015,
        endMonth: 0,
        endDay: 0,
        soundControlCssClass: 'icon sound margin-top-20  body-google-font',
        messageBoxId: "percent-message",
        callbackFinish: callback,
    });

    $(".flip-title-subheading").html("was created in: " + new Date() + " and we`ll finish after: " + window.endDate);
});
jQuery(document).ready(function () {
    setTimeout(function () {
        $(".flip-container").animate({
            "height": 105 + "px"
        }, 1000, "swing");
    }, 1000);
});

我想知道如何设置起始年,起始月,起始日自动在当前日期请。

jQuery(document).ready(function () {

    function callback() {
        alert("finish");
    }
    var dt = new Date();
    $("#flipit").coffeetime({
        /* COUNTDOWN SETTINGS */
        message: message, // the message array with the array keys as percent values
        startYear: dt.getFullYear(),
        startMonth: dt.getMonth() + 1,
        startDay: dt.getDate(),
        endYear: 2015,
        endMonth: 0,
        endDay: 0,
        soundControlCssClass: 'icon sound margin-top-20  body-google-font',
        messageBoxId: "percent-message",
        callbackFinish: callback,
    });

    $(".flip-title-subheading").html("was created in: " + new Date() + " and we`ll finish after: " + window.endDate);
});
jQuery(document).ready(function () {
    setTimeout(function () {
        $(".flip-container").animate({
            "height": 105 + "px"
        }, 1000, "swing");
    }, 1000);
});

相关内容

  • 没有找到相关文章

最新更新