Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

Window: clearInterval() method

BaselineWidely available

TheclearInterval() method of theWindow interface cancels a timed, repeating action which was previously established by a call tosetInterval(). If the parameter provided does not identify a previously established action, this method does nothing.

Syntax

js
clearInterval(intervalID)

Parameters

intervalID

The identifier of the repeated action you want to cancel. This ID was returned bythe corresponding call tosetInterval().

It's worth noting that the pool of IDs used bysetInterval() andsetTimeout() are shared, whichmeans you can technically useclearInterval() andclearTimeout() interchangeably.However, for clarity, you should avoid doing so.

Return value

None (undefined).

Examples

SeesetInterval() for examples.

Specifications

Specification
HTML
# dom-clearinterval-dev

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp