jq获取当前小时_jquery获取当前时间
你把分给 1 楼吧,他想给你发网址,结果被屏蔽了,他让我帮你回答一下,我直接给你例子,
你想要设置初试时间,注意看参数:
since: null,
// new Date(year, mth - 1, day, hr, min, sec) - date/time to count up from
// or numeric for seconds offset, or string for unit offset(s):
// 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds
// 计时开始时间
实例开始:
----------------------------------------------------
$(selector).countdown({
labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'],
// The expanded texts for the counters
labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'],
// The display texts for the counters if only one
compactLabels: ['y', 'm', 'w', 'd'],
// The compact texts for the counters
whichLabels: null,
// Function to determine which labels to use
timeSeparator: ':',
// Separator for time periods
isRTL: false,
// True for right-to-left languages, false for left-to-right
until: null,
// new Date(year, mth - 1, day, hr, min, sec) - date/time to count down to
// or numeric for seconds offset, or string for unit offset(s):
// 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds
// 计时器结束时间
since: null,
// new Date(year, mth - 1, day, hr, min, sec) - date/time to count up from
// or numeric for seconds offset, or string for unit offset(s):
// 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds
// 计时开始时间
timezone: null,
// The timezone (hours or minutes from GMT) for the target times,
// or null for client local
// 时区 当值为空指的就是本机当地时间
serverSync: null,
// A function to retrieve the current server time for synchronisation
// 同步服务器时间的函数
format: 'dHMS',
// Format for display - upper case for always, lower case only if non-zero,
// 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds
// 格式化日期 年(y)-月(o)-周(w)-日(d)-时(h)-分(m)-秒(s)
layout: '',
// Build your own layout for the countdown
compact: false,
// True to display in a compact format, false for an expanded one
// 紧凑模式显示时间 如:0y 8m 0w 0d 18:10:51
significant: 0,
// The number of periods with values to show, zero for all
// 仅显示那些有意义的时间
description: '',
// The description displayed for the countdown
// 定义倒计时的语言 调用时候得附加官网的语言包
expiryUrl: null,
// A URL to load upon expiry, replacing the current page
// 当计时到期自动跳转到新的页面并替换当前页
alwaysExpire: false,
// True to trigger onExpiry even if never counted down
// 无论是否计时到期都执行回调函数
onExpiry: null,
// Callback when the countdown expires -
// receives no parameters and 'this' is the containing division
// 倒计时到期执行回调函数
onTick: null,
// Callback when the countdown is updated -
// receives int[7] being the breakdown by period (based on format)
// and 'this' is the containing division
tickInterval: 1
// Interval (seconds) between onTick callbacks
// 间隔多少秒执行一次onTick
});
取消
评论