Skip to content

一个jQuery版的倒计时插件(关联服务器时间)

License

Notifications You must be signed in to change notification settings

luzhaoxuan/countdown.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

countdown.js

一个jQuery版的倒计时插件

如不需要获取服务器时间可将一下代码:

$.ajax({
	url: './api/stampTime.json', // 获取服务器时间戳
	type: 'GET',
	dataType: "json",
	success: function(data) {
	if (data.success) {
		_self.startCount(data.data.time * 1000);
	}
	},
	error: function(xh, err) {
		console.log(err);
	}
});

修改为:

_self.startCount(+new Date());

About

一个jQuery版的倒计时插件(关联服务器时间)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.8%
  • HTML 19.2%