Ela*_*ich 6 javascript settimeout
该HTML5 规范,各国setTimeout可以在不这是应该经过多少毫秒将函数"处理程序"被安排说额外的"超时"的说法来运行.
handle = window . setTimeout( handler [, timeout [, arguments ] ] )
Schedules a timeout to run handler after timeout milliseconds. Any arguments are passed straight through to the handler.
Run Code Online (Sandbox Code Playgroud)
但是,我没有找到解释当没有设置"超时"时间段时会发生什么的任何地方.
一个示例用法是Raphael库中的动画实现.
animationElements[length] && win.setTimeout(animation);
Run Code Online (Sandbox Code Playgroud)
Ada*_*ght 15
见http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#get-the-timeout
- 令timeout为该方法的第二个参数,如果省略该参数则为零.
| 归档时间: |
|
| 查看次数: |
3709 次 |
| 最近记录: |