Detailed explanation of the use and definition of clearInterval() method in JavaScript

黄舟
Release: 2017-12-04 09:44:04
Original
7394 people have browsed it

Friends who often use JavaScript should have some understanding of the clearInterval() method. It can cancel the timer set by the setInterval() method. Some friends may not understand it very well. Today I will introduce to you the definition of the clearInterval() method. and usage!

This method can cancel the timer set by the setInterval() method.

The parameter of this method must be the return value of the corresponding setInerval() method to be canceled.

Click to see more properties and methods of the window object.

Syntax structure:

clearInterval(id)
Copy after login

Parameter list:

Parameters Description
id Required. This id is the return value of setInerval() and is the unique identifier of this setInerval() method.

Browser support:

(1). IE browser supports this attribute.
(2).Firefox browser supports this attribute.
(3).Opera browser supports this attribute.
(4).Chrome browser supports this attribute.
(5).Safria browser supports this method.

Code example:

     window对象的clearInterval()方法 -蚂蚁部落   

Copy after login

Summary:

This article uses examples to introduce the use of the clearInterval() method in JavaScript. I believe many friends have a certain understanding of this! , hope it will be helpful to your work!

Related recommendations:

Sample code for using setInterval and clearInterval

The calling method of setinterval() and clearInterval() JS functions

The definition and usage of js clearInterval() method

The above is the detailed content of Detailed explanation of the use and definition of clearInterval() method in JavaScript. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!