倒计时器转移到另一页

时间:2014-05-12 10:09:52

标签: javascript html

我想做什么:

当这个计时器在分钟点击00和在秒点击00时,我希望它将用户转移到另一个页面...我只是从代码开始,所以如果我想做一些愚蠢的事情,请放轻松我...... / p>

这是指数:

<p>Here you can place what you would like the heading to be</p>

<script src="countdown.js" type="text/javascript"></script>
<script type="application/javascript">
    var myCountdownTest = new Countdown({
        year: 2014,
        month: 5, 
        day: 12,
        hour: 10,
        minute: 56,
        width: 300, 
        height: 50
    });
</script>

还有一个countdown.js

https://www.dropbox.com/s/u6hp8g7odq2otg3/countdown.js

1 个答案:

答案 0 :(得分:0)

了解倒计时的工作原理。答案已经提供给Asker,但认为它也应该放在这里供参考:

var timer = new Countdown({
    year: 2014,
    month: 5,
    day: 12,
    hour: 10,
    minute: 56,
    width: 300,
    height: 50,
    onComplete: onTimerComplete
});

function onTimerComplete()
{
    // perform action
}

倒计时一旦完成,它就会调用onTimerComplete函数。