Javascript 如何使用jQuery倒计时确定特定时间
我正在使用以下jQuery插件: 我试图让它倒计时到每天17:00(下午5:00),但我似乎无法设置时间 欢迎任何帮助 我的密码是:Javascript 如何使用jQuery倒计时确定特定时间,javascript,jquery,Javascript,Jquery,我正在使用以下jQuery插件: 我试图让它倒计时到每天17:00(下午5:00),但我似乎无法设置时间 欢迎任何帮助 我的密码是: $(function() { var now = new Date() var since = new Date(now.getFullYear(), now.getMonth(), now.getDay(), 17, 00); $('#noDays').countdown({until: since, format: 'HMS'}); }
$(function() {
var now = new Date()
var since = new Date(now.getFullYear(), now.getMonth(), now.getDay(), 17, 00);
$('#noDays').countdown({until: since, format: 'HMS'});
});
计时器用此代码锁定在0处。想想你在找这个:
var now = new Date()
var since = new Date(now.getFullYear(), now.getMonth(), now.getDay(), 17, 00);
试试这个(和工作示例):
请显示您的代码,并解释运行代码时会发生什么。17:00是什么意思?你能详细说明一下吗,也许我可以帮你,我在我自己的项目中使用了这个插件。
$(function(){var now=new Date()var after=new Date(now.getFullYear(),now.getMonth(),now.getDay(),17,00);$('#noDays').countdown({untill:after,format:'HMS');})代码>不起作用。计时器在0
$(function() {
var liftoff = new Date();
liftoff = new Date(liftoff.getFullYear(), liftoff.getMonth(), liftoff.getDate(), 17, 0, 0);
$('#noDays').countdown({until: liftoff});
});