美文网首页
js实现倒计时效果

js实现倒计时效果

作者: 李奕锦liyijin | 来源:发表于2018-09-28 17:30 被阅读0次

倒计时相关基础知识:
首先定义对象的关键词
var date = new Date()

getFullYear()获取年
getMonth()获取月 ——从0开始,需要+1
getDate()获取日
getDay() 获取星期
getHours()获取时
getMinutes()获取分
getSeconds()获取秒
getTime()获取毫秒

demo
http://jsbin.com/bibebakopu/edit?html,output

image.png

相关文章

网友评论

      本文标题:js实现倒计时效果

      本文链接:https://www.haomeiwen.com/subject/boipoftx.html