1. setInterval(func, time) 间隔定时器
timer = setInterval(func, time)
clearInterval(timer) 关闭定时器
2. setTimeOut(func, time) 延时定时器
timer = setTimeOut(func, time)
clearTimeOut(timer) 关闭定时器
3. 日期对象 返回值皆为数字
Date = new Date()
Date.getHours()
Date.getHours()
Date.getMinites()
Date.getSeconds()
Date.getFullYear()
Date.getMonth() 所得月为当前月减一 所以 +1 为正解
Date.getDate() 得到日
Date.getDay() 得到星期 且从0开始 对应周日
4. 头像与头像对应资料的延迟显示
在两个DIV间合理交互使用setTimeOut() 与 clearTimeOut()
5. 设置图像滚动
setInterval()
通过设置offSetLeft 与定时器结合 达到定时平移效果