Home > Web Front-end > JS Tutorial > A brief analysis of javascript timer_basic knowledge

A brief analysis of javascript timer_basic knowledge

WBOY
Release: 2016-05-16 16:25:02
Original
1208 people have browsed it

setTimeout()--used to specify to execute a certain program after a specific period of time.

Format:

[Timer object name=]setTimeout(“”, milliseconds);

Function: Execute once.

The expression is a string, which can be any javascript statement

Copy code The code is as follows:









setInterval()—repeatedly executes until the window or frame is closed or clearInterval

is executed

Format: [timer object name=]setInterval(“”, milliseconds)

clearInterval() terminates the timer

Format: clearInterval(timer object name)

Copy code The code is as follows:






0seconds


Is it very useful? Friends who need it can refer to it.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template