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

A brief analysis of javascript timer_basic knowledge

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:25:021242browse

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.

Statement:
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