- // sec = number of seconds
- function paused(sec) {
- stop(); // action to pause
- var i = sec - 1;
- var t = setInterval(function () {
- if (i == 0) {
- clearInterval(t);
- play(); // action to continue
- }
- i--;
- }, 1000);
- }
- //该片段来自于http://www.codesnippet.cn/detail/150320132438.html
来源: http://www.codesnippet.cn/detail/150320132438.html