setTimeout (表达式,延时时间)
setInterval(表达式,交互时间)
延时时间/交互时间是以豪秒为单位的(1000ms=1s)
setTimeout 在执行时,是在载入后延迟指定时间后,去执行一次表达式,仅执行一次
setInterval 在执行时,它从载入后,每隔指定的时间就执行一次表达式
转载于:https://www.cnblogs.com/mygood/articles/1406941.html
转载于:https://www.cnblogs.com/mygood/articles/1406941.html